-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #219 from jsocol/gh-actions
Add a github action to run tests and linter
- Loading branch information
Showing
2 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Python package | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.5, 3.6, 3.7, 3.8] | ||
django: [2.2, 3.0, 3.1, master] | ||
exclude: | ||
- python-version: 3.5 | ||
django: 3.0 | ||
- python-version: 3.5 | ||
django: 3.1 | ||
- python-version: 3.5 | ||
django: master | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [[ ${{ matrix.django }} != master ]]; then pip install --pre -q "Django>=${{ matrix.django }},<${{ matrix.django }}.99"; fi | ||
if [[ ${{ matrix.django }} == master ]]; then pip install https://github.com/django/django/archive/master.tar.gz; fi | ||
pip install flake8 django-redis python3-memcached | ||
- name: Lint with flake8 | ||
run: | | ||
./run.sh flake8 | ||
- name: Test | ||
run: | | ||
./run.sh test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters