Skip to content

Run scheduled test

Run scheduled test #6

# This workflow does a `pip install -e` of the package, then runs tests.
# - this tests that, with the current versions of dependencies one would get with
# an instal lfrom pypi, the package installs and functions as expected (different from the publish workflow, which tests using packages
# in the dev environment lock file)
# - it also tests for changes in codeocean/s3 data organization, which could break
# the functionality of the package
name: Run scheduled test
on:
schedule:
- cron: '0 0 * * 2,5' # every day at midnight (UTC)
workflow_dispatch: # adds a 'Run Workflow' button for manual launching
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.9", "3.11"]
os: [ubuntu-latest, macOS-latest, windows-latest]
permissions: write-all
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- name: Checkout latest release
run: |
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install -e .
pip install pytest pytest-cov
- name: Test, format, lint
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CODE_OCEAN_API_TOKEN: ${{ secrets.CODE_OCEAN_API_TOKEN }}
run: |
pytest --cov-report term-missing:skip-covered