mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-25 23:58:23 +00:00
Different approach to CI dependencies
This commit is contained in:
24
.github/workflows/django.yml
vendored
24
.github/workflows/django.yml
vendored
@@ -8,6 +8,8 @@ on:
|
||||
|
||||
jobs:
|
||||
dependencies:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -17,17 +19,7 @@ jobs:
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: static/
|
||||
key: static-${{ hashFiles('package-lock.json') }}-${{ hashFiles('RIGS/static') }}
|
||||
test:
|
||||
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
||||
needs: dependencies
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
test-group: ["RIGS", "versioning", "users", "assets"]
|
||||
steps:
|
||||
key: static-${{ hashFiles('package-lock.json') }}-${{ hashFiles('pipeline/source_assets') }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
@@ -56,6 +48,16 @@ jobs:
|
||||
pycodestyle . --exclude=migrations,importer*
|
||||
python manage.py check
|
||||
python manage.py makemigrations --check --dry-run
|
||||
test:
|
||||
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
||||
needs: dependencies
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
test-group: ["RIGS", "versioning", "users", "assets"]
|
||||
steps:
|
||||
- name: Run Tests
|
||||
run: coverage run -p -m pytest --cov=${{ matrix.test-group }} --cov-append -n 8 ${{ matrix.test-group }}/tests/
|
||||
- uses: actions/upload-artifact@v2
|
||||
|
||||
Reference in New Issue
Block a user