Bump actions/upload-artifact from 6 to 7 #532
Workflow file for this run
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
| # This workflow will install Python dependencies, run tests and lint with a single version of Python | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| name: Test astrodb_utils | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| astrodb-template-db-branch: | |
| description: 'Branch of astrodb-template-db to use' | |
| required: true | |
| default: 'main' | |
| type: string | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Checkout utils repo | |
| uses: actions/checkout@v6 | |
| - name: Checkout template database repo | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: astrodbtoolkit/astrodb-template-db | |
| path: tests/astrodb-template-db | |
| ref: ${{ inputs.astrodb-template-db-branch }} | |
| - name: Check ADS_TOKEN | |
| shell: bash | |
| env: | |
| ADS_TOKEN: ${{ secrets.ADS_TOKEN }} | |
| run: | | |
| if [[ -z "${ADS_TOKEN}" ]]; then | |
| echo "ADS_TOKEN is not set, ADS tests will be skipped" | |
| else | |
| echo "ADS_TOKEN is set" | |
| fi | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install .[test] | |
| pip install pytest pytest-cov | |
| - name: Run linter | |
| run: | | |
| ruff check . --ignore=C901 --exit-zero | |
| ruff check . --statistics --exit-zero | |
| - name: Test with pytest | |
| run: | | |
| pytest --cov --cov-branch --cov-report=xml | |
| - name: Upload results to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |