Skip to content

Add Codecov integration and update GitHub Actions workflow #90

Add Codecov integration and update GitHub Actions workflow

Add Codecov integration and update GitHub Actions workflow #90

Workflow file for this run

name: Build and Test
on:
pull_request:
branches: [ main ]
paths-ignore:
- '**/_version.py'
push:
branches: [ main ]
paths-ignore:
- '**/_version.py'
workflow_dispatch:
jobs:
test:
name: Build and Test
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Set up AllenInstitute Repo Authorization
uses: ./.github/actions/configure-org-repo-authorization
with:
token: ${{ secrets.AI_PACKAGES_TOKEN }}
ssh_private_key: ${{ secrets.AIBSGITHUB_PRIVATE_KEY }}
- name: Run Release
run: |
make release
shell: bash
- name: Upload coverage reports
if: |
${{
success()
&& (
(github.event_name == 'pull_request' && github.base_ref == 'main')
|| (github.event_name == 'push' && github.ref_name == 'main')
|| github.event_name == 'workflow_dispatch'
)
&& matrix.python-version == '3.11'
}}
uses: codecov/codecov-action@v5
with:
# https://github.com/codecov/codecov-action#arguments
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: PYTHON_VERSION