Merge pull request #105 from opengisch/QF-8089-fix-list-jobs #452
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Continuous integration | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| code_check: | |
| name: Code check | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| cache: 'pip' | |
| - name: Install formatter | |
| run: pip install pre_commit | |
| - name: Check format | |
| run: python -m pre_commit run --all-files | |
| unit_tests: | |
| name: Run unit tests & build | |
| strategy: | |
| matrix: | |
| python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run unit tests | |
| run: ENVIRONMENT=test python -m unittest discover | |
| - name: Build tools | |
| run: pip install build | |
| - name: Build | |
| run: python -m build | |
| - name: Install | |
| run: pip install dist/qfieldcloud_sdk-0.0.1-py3-none-any.whl |