| name: CI | |
| on: | |
| push: | |
| branches: ['main'] | |
| pull_request: | |
| branches: ['main'] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| cache: 'pip' | |
| - name: Install hatch | |
| run: | | |
| python -m pip install --upgrade pipx | |
| pipx install hatch | |
| - name: Run tests | |
| run: hatch run run-coverage | |
| env: | |
| HATCH_ENV: "test" | |
| - name: Build packages | |
| run: hatch build -c -t sdist -t wheel | |
| - name: "Upload packages" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: packages | |
| path: ./dist/apache_airflow_client-* | |
| retention-days: 7 | |
| if-no-files-found: error |