workflows: Add github actions file

Should be basically the same as the Travis CI file except more verbose
(ugh) and a different version matrix.

- 2.7 3.4 3.5 3.6 3.7 pypy pypy3
+ 2.7 3.5 3.7 3.9 pypy3

Kept 2.7 because we still run it. Dropped pypy2 because who cares?

Dropped 3.4 because it's way old at this point. Added 3.9 because it's
the latest release. Kept 3.5 and 3.7 and dropped the even releases
because it seems silly to test five different releases - the oldest and
newest we support should be adequate (plus 3.7 because that's what i
have.)
This commit is contained in:
Andrew Ekstedt 2021-03-19 20:25:39 -07:00
parent 0a233ec795
commit 72f31bc9d3
1 changed files with 38 additions and 0 deletions

38
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,38 @@
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build and test
on:
push:
branches: '**'
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.7, 3.9, pypy3]
# don't cancel every other job if one fails
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest wheel
pip install -e .
- name: Set up pokedex
run: pokedex setup -v
- name: Test with pytest
run: pytest
- name: Dump database and check for differences
run: |
pokedex dump
git --no-pager diff --exit-code pokedex/data/csv/