Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
53 additions
and
17 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
- '*.*.*' | ||
schedule: | ||
- cron: '0 8 * * 1' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.5, 3.6, 3.7, 3.8, 3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Setup the WIMS server | ||
run: | | ||
docker run -itd --cpuset-cpus=$(($(cat /proc/cpuinfo | grep -e "processor\s*:\s*\d*" | wc -l) - 1)) -p 7777:80 --name wims-minimal qcoumes/wims-minimal | ||
docker exec -i wims-minimal ./bin/apache-config | ||
docker exec -i wims-minimal service apache2 restart | ||
- name: Install Tox and any other packages | ||
run: | | ||
pip install tox | ||
- name: Run Tox | ||
run: tox -e py | ||
|
||
- name: Upload coverage to Codecov | ||
if: matrix.python-version == 3.8 | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./coverage.xml |