Skip to content

Commit

Permalink
Add GitHub Actions (#73)
Browse files Browse the repository at this point in the history
Here's the smallest possible github actions workflow I could put together. Many other bells and whistles could be added, but this goes pretty far to getting more platform/python coverage.

For a look at what this is like, here's a [self-PR](bollwyvl#1) and a [run](https://github.com/bollwyvl/genanki/actions/runs/663127404).

References:
- fixes #64
  • Loading branch information
bollwyvl committed Mar 28, 2021
1 parent bd44784 commit fc8148a
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python-version: [3.6, 3.8, 3.9]
anki-version: [ed8340a4e3a2006d6285d7adf9b136c735ba2085]
exclude:
# compatible pyaudio not available
- os: windows
python-version: 3.8
- os: windows
python-version: 3.9
steps:
- uses: actions/checkout@v2
- if: ${{ matrix.os == 'ubuntu' }}
run: sudo apt-get install portaudio19-dev python3-dev
- if: ${{ matrix.os == 'macos' }}
run: brew install portaudio
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: python3 -m pip install --upgrade pip wheel setuptools
- if: ${{ matrix.os == 'windows' }}
run: python3 -m pip install pywin32
- name: install package and tests_require from setup.py
run: python3 -m pip install -e ".[test]" pytest-cov codecov
- run: |
git clone https://github.com/ankitects/anki.git anki_upstream
cd anki_upstream
git reset --hard ${{ matrix.anki-version }}
python3 -m pip install -r requirements.txt
- run: |
python3 -m pytest tests -vv --cov genanki --cov-report term-missing:skip-covered --no-cov-on-fail
- run: codecov

0 comments on commit fc8148a

Please sign in to comment.