diff options
author | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2021-04-22 22:40:52 +0300 |
---|---|---|
committer | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2021-09-13 11:54:57 +0300 |
commit | 6923aee503ac81c26d2425592e90a2254c7666d9 (patch) | |
tree | ca5ffeff7069564f9fa0ac52b14e16c48188430e /.github/workflows | |
parent | 27cebc56a0f6a900eeb897512879d545095f410b (diff) | |
download | isodate-6923aee503ac81c26d2425592e90a2254c7666d9.tar.gz |
Move from Travis CI to GitHub Actions and Coveralls to Codecov
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/lint.yml | 12 | ||||
-rw-r--r-- | .github/workflows/test.yml | 59 |
2 files changed, 71 insertions, 0 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..6f8c677 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,12 @@ +name: Lint + +on: [push, pull_request] + +jobs: + lint: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - uses: pre-commit/action@v2.0.2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..bab2ac2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,59 @@ +name: Test + +on: [push, pull_request] + +env: + FORCE_COLOR: 1 + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: ["3.6", "3.7", "3.8", "3.9", "pypy3"] + os: [ubuntu-latest, macos-latest, windows-latest] + include: + # Include new variables for Codecov + - { codecov-flag: GHA_Ubuntu, os: ubuntu-latest } + - { codecov-flag: GHA_macOS, os: macos-latest } + - { codecov-flag: GHA_Windows, os: windows-latest } + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache + uses: actions/cache@v2 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: + ${{ matrix.os }}-${{ matrix.python-version }}-v1-${{ + hashFiles('**/setup.py') }} + restore-keys: | + ${{ matrix.os }}-${{ matrix.python-version }}-v1- + + - name: Install dependencies + run: | + python -m pip install -U pip + python -m pip install -U wheel + python -m pip install -U tox + + - name: Tox tests + run: | + tox -e py + + - name: Upload coverage + uses: codecov/codecov-action@v1 + with: + flags: ${{ matrix.codecov-flag }} + name: ${{ matrix.os }} Python ${{ matrix.python-version }} |