Different approach to CI dependencies

This commit is contained in:
2021-01-28 02:08:22 +00:00
parent 1fbe59dfb0
commit 3b3ba0b87e

View File

@@ -8,6 +8,8 @@ on:
jobs: jobs:
dependencies: dependencies:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@@ -17,17 +19,7 @@ jobs:
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: static/ path: static/
key: static-${{ hashFiles('package-lock.json') }}-${{ hashFiles('RIGS/static') }} key: static-${{ hashFiles('package-lock.json') }}-${{ hashFiles('pipeline/source_assets') }}
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: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
@@ -56,6 +48,16 @@ jobs:
pycodestyle . --exclude=migrations,importer* pycodestyle . --exclude=migrations,importer*
python manage.py check python manage.py check
python manage.py makemigrations --check --dry-run 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 - name: Run Tests
run: coverage run -p -m pytest --cov=${{ matrix.test-group }} --cov-append -n 8 ${{ matrix.test-group }}/tests/ run: coverage run -p -m pytest --cov=${{ matrix.test-group }} --cov-append -n 8 ${{ matrix.test-group }}/tests/
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2