Skip to content

Commit

Permalink
Update GitHub actions to latest version
Browse files Browse the repository at this point in the history
Also:
 - Change cache to pipenv modules
 - Remove asgiref from Pipfile
 - Make action case consistent
  • Loading branch information
czlee authored and philipbelesky committed Apr 17, 2022
1 parent efd6592 commit 6280ade
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,19 @@ jobs:
GITHUB_CI: true # Just 'CI' clashes with Render

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
# The actions/cache step below uses this id to get the exact python version
id: setup-python
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 12.x
- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
Expand All @@ -43,44 +53,34 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache pip modules
uses: actions/cache@v2
- name: Cache pipenv modules
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install Dependencies
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv
pipenv install --system --dev
npm ci
- name: Run Linting
- name: Run linting
run: npm run lint
- name: Run Build and Collect
- name: Run build and collect
run: |
npm run build
python ./tabbycat/manage.py collectstatic --noinput -v 0
- name: Run Migrations
- name: Run migrations
run: python ./tabbycat/manage.py migrate
- name: Run Tests
- name: Run tests
run: python tabbycat/manage.py test -v 2 --exclude-tag=selenium

build-docker-dev:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Build Docker image (dev)
Expand All @@ -91,7 +91,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Build Docker image (prod)
Expand Down

0 comments on commit 6280ade

Please sign in to comment.