[pre-commit.ci] pre-commit autoupdate #2407
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: Tests | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '17 22 * * *' | |
env: | |
OMP_NUM_THREADS: 2 | |
jobs: | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/sblauth/cashocs:main | |
options: --user=root | |
steps: | |
- name: Delete current installation in docker image | |
shell: bash | |
run: | | |
source /usr/local/bin/_entrypoint.sh | |
pip uninstall -y cashocs | |
rm -R /home/mambauser/cashocs | |
- name: Checkout repository | |
uses: actions/checkout@v4.1.1 | |
- name: Install cashocs | |
shell: bash | |
run: | | |
source /usr/local/bin/_entrypoint.sh | |
pip install .[all] | |
- name: Run tests | |
shell: bash | |
run: | | |
source /usr/local/bin/_entrypoint.sh | |
python3 -m pytest -vv --cov=cashocs --cov-report=xml tests/ | |
- name: Upload coverage to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
files: coverage.xml | |
- name: Upload coverage to codacy | |
continue-on-error: true | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: coverage.xml |