Skip to content

Commit

Permalink
fix: Updated github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
qcoumes committed Jul 19, 2021
1 parent 9756e7b commit 1105b36
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 17 deletions.
@@ -1,23 +1,15 @@
name: Python package
name: Publish

on:
push:
branches:
- master
- '*.*.*'
pull_request:
branches:
- master
- '*.*.*'
schedule:
- cron: '0 8 * * 1'
tags: ['**']

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9 ]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -46,19 +38,17 @@ jobs:
with:
file: ./coverage.xml


publish:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
continue-on-error: true
needs: test

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9

- name: Creating Built Distributions
run: python setup.py sdist
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/test.yml
@@ -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

0 comments on commit 1105b36

Please sign in to comment.