From 6a8c567cfef8d4676b7a1c0816573ac31b62e6f8 Mon Sep 17 00:00:00 2001 From: Arona Jones Date: Sun, 27 Dec 2020 18:00:09 +0000 Subject: [PATCH] First pass at replacing travis Ref #415 --- .github/workflows/django.yml | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/django.yml diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml new file mode 100644 index 00000000..1a6eb97a --- /dev/null +++ b/.github/workflows/django.yml @@ -0,0 +1,52 @@ +name: Django CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Setup Chromedriver + run: | + wget https://chromedriver.storage.googleapis.com/2.36/chromedriver_linux64.zip + unzip chromedriver_linux64.zip + export PATH=$PATH:$(pwd) + chmod +x chromedriver + export PATH=$PATH:/usr/lib/chromium-browser/ + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + python manage.py collectstatic --noinput + - name: Basic Checks + run: | + pycodestyle . --exclude=migrations,importer* + python manage.py check + python manage.py makemigrations --check --dry-run + - name: Run Tests + run: | + coverage run manage.py test --verbosity=2 + + release: + runs-on: ubuntu-latest + needs: build + steps: + - name: Coverage + run: | + coveralls + codeclimate-test-reporter