feat: for tracks, allow for iterative writing rather than bulk_overwr… #161
This file contains 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: Test & Doc | |
on: | |
push: | |
branches: [ devel ] | |
pull_request: | |
branches: [ devel ] | |
permissions: | |
contents: write | |
jobs: | |
Test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] | |
include: | |
- os: ubuntu-latest | |
# - os: windows-latest | |
# - os: macos-latest | |
runs-on: ${{ matrix.os }} | |
env: | |
GCS_CREDS_PASSPHRASE: ${{ secrets.GCS_CREDS_PASSPHRASE }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install package and dependencies on ${{ matrix.os }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[dev] | |
- name: Decrypt GCS credentials file | |
run: | | |
gpg --batch --yes --quiet --passphrase "${{ env.GCS_CREDS_PASSPHRASE }}" --decrypt --output gcs_creds.json .gcs_creds.json.gpg | |
- name: Run tests on ${{ matrix.os }} | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AZURE_STORAGE_ACCOUNT_KEY: ${{ secrets.AZURE_STORAGE_ACCOUNT_KEY }} | |
run: | | |
ruff check . --select=E9,F63,F7,F82 | |
pytest --cov --cov-report=xml | |
- name: Cleanup gcs_creds.json | |
if: always() | |
run: | | |
rm -f gcs_creds.json | |
- name: Upload results to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
Doc: | |
runs-on: ubuntu-latest | |
needs: Test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install pandoc (required for doc generation) | |
uses: pandoc/actions/setup@v1 | |
- name: Buid Sphinx doc | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[dev,docs] | |
make -C docs html | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }} | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/build/html | |
force_orphan: true |