Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MacHu-GWU committed Dec 3, 2020
1 parent 93faa65 commit 93e1aa5
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ on:
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
runs-on: "ubuntu-latest" # runs on ubuntu-latest VM, for all available VM runtime, see this: https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners
env: # define environment variables
USING_COVERAGE: "2.7,3.6"
strategy:
matrix:
python-version: ["2.7", "3.6"]
Expand All @@ -24,12 +26,21 @@ jobs:
- uses: "actions/setup-python@v2" # https://github.com/marketplace/actions/setup-python
with:
python-version: "${{ matrix.python-version }}"

- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions
# - name: "Run tox targets for ${{ matrix.python-version }}"
# run: "python -m tox"
python -m pip install --upgrade pip setuptools wheel virtualenv codecov
pip install .
pip install -r requirements-test.txt
- name: "Run tox targets for ${{ matrix.python-version }}"
run: "python -m pytest tests --cov=constant2"

- name: "Upload coverage to Codecov"
if: "contains(env.USING_COVERAGE, matrix.python-version)"
uses: "codecov/codecov-action@v1"
with:
fail_ci_if_error: true

0 comments on commit 93e1aa5

Please sign in to comment.