Jean/fed kaplan #246
Workflow file for this run
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: pr-validation | |
# Controls when the workflow will run | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths-ignore: | |
- 'experiments/**' # if only the exps are modified, no need to run it | |
- 'docs/**' # if only the docs are modified, no need to run it | |
schedule: | |
# Every monday at 3h30 UTC | |
- cron: '30 3 * * 1' | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
verify_windows_setup: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ windows-2019 ] | |
python: [ "3.9" ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Do not checkout in the current working directory to ensure the further imported module is the installed one | |
path: anywhere | |
- name: Install miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: ${{ matrix.python }} | |
activate-environment: fedeca | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e "./anywhere/[all_extra]" | |
- name: Test import successful | |
run: | | |
python -c "import fedeca" | |
pip list | |
run_tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
python: ["3.9"] | |
# python: ["3.9", "3.10", "3.11"] # TODO: expand to other pythons | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[all_extra]" | |
- name: Testing with pytest | |
run: | | |
coverage run -m pytest -v fedeca | |
- name: Generate code coverage report | |
run: | | |
coverage html --omit="*/local-worker/*" | |
- name: Upload coverage artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-coverage-report | |
path: htmlcov/ | |
retention-days: 20 |