Skip to content

Commit

Permalink
update CI (#16)
Browse files Browse the repository at this point in the history
* use setup-miniconda

* update tunittest.yml

* tweak

* tweak

* Update unit tests workflow to use Ubuntu 20.04 and setup Python 3.9

* Add system dependencies and update unit test workflow

* Update system dependency installation commands

* tweak

* use conda in testing

* Add python>=3.6 as a dependency in environment.yml

* use buildx

* typo

* readd coverage

* update action versions

* Remove prodigy-cryst environment.yml file

* Update coverage report path

* Update coverage report format in unit tests workflow

* update coverage path

* Update coverage report path in unittests.yml
  • Loading branch information
rvhonorato authored Mar 20, 2024
1 parent ec78c3c commit 9e77e26
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/checkout@v4

- uses: actions/setup-python@v2.2.2
with:
python-version: 3.9
- uses: docker/setup-buildx-action@v3

- name: pull anaconda3:2022.10 image
run: docker pull continuumio/anaconda3:2022.10

- name: Install dependencies
- name: run the container
run: |
pip install -r requirements.txt coverage pytest pytest-cov hypothesis
docker run --name test-anaconda-container -d -v ${{ github.workspace }}:/workspace continuumio/anaconda3:2022.10 tail -f /dev/null
- name: Test
- name: install system dependencies
run: |
pytest --cov --cov-report=term-missing --cov-append -vv --hypothesis-show-statistics .
coverage xml
docker exec test-anaconda-container apt-get update
docker exec test-anaconda-container apt-get install -y --no-install-recommends build-essential
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml
- name: install python dependencies
run: |
docker exec test-anaconda-container pip install -r workspace/requirements.txt coverage pytest pytest-cov hypothesis
- name: run tests
run: |
docker exec test-anaconda-container pytest --cov --cov-report xml:workspace/coverage.xml --cov-append -vv --hypothesis-show-statistics workspace/
- uses: codecov/codecov-action@v3
- uses: codacy/codacy-coverage-reporter-action@v1
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coverage.xml

0 comments on commit 9e77e26

Please sign in to comment.