Skip to content

Bump postcss from 8.4.20 to 8.4.32 in /frontend #321

Bump postcss from 8.4.20 to 8.4.32 in /frontend

Bump postcss from 8.4.20 to 8.4.32 in /frontend #321

Workflow file for this run

name: Test
on: [push]
env:
PYTHON_VERSION: 3.9
DJANGO_POSTGRES_USER: postgres
DJANGO_POSTGRES_PASSWORD: postgres
DJANGO_POSTGRES_DATABASE: postgres
DJANGO_SECRET: notsecret
DJANGO_DEBUG: 1
jobs:
test-backend:
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: ${{ env.DJANGO_POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.DJANGO_POSTGRES_PASSWORD }}
POSTGRES_DB: ${{ env.DJANGO_POSTGRES_DATABASE }}
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "pip"
- name: Install translation dependencies
run: |
sudo apt install gettext
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
- name: Check code style
run: |
black --check .
- name: Check if all migrations have been created
run : |
python manage.py makemigrations users spritstat --check --noinput
- name: Apply migrations
run: |
python manage.py migrate --noinput
- name: Check locales
run: |
python manage.py checkmessages
- name: Compile locales
run: |
python manage.py compilemessages
- name: Execute tests
run: |
python manage.py test
prepare-end-to-end-tests:
runs-on: ubuntu-latest
outputs:
integration-tests: ${{ steps.parse.outputs.integration-tests }}
steps:
- uses: actions/checkout@v3
- name: Install frontend dependencies
working-directory: ./frontend
run: |
npm install
- name: Check translations
working-directory: ./frontend
run: |
npm run trans:manage -- --check
- name: Build frontend
uses: cypress-io/github-action@v5
with:
working-directory: frontend
runTests: false
build: npm run build:dev
- name: Save build folder for use in end-to-end tests
uses: actions/upload-artifact@v3
with:
name: build
if-no-files-found: error
path: |
frontend/public/
frontend/templates/
retention-days: 1
- name: Collect test specs to allow for parallel tests
id: parse
uses: tgamauf/[email protected]
with:
working-directory: frontend
count-runners: 5
test-end-to-end:
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: ${{ env.DJANGO_POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.DJANGO_POSTGRES_PASSWORD }}
POSTGRES_DB: ${{ env.DJANGO_POSTGRES_DATABASE }}
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
runs-on: ubuntu-latest
needs: prepare-end-to-end-tests
strategy:
fail-fast: false
matrix:
spec: ${{ fromJson(needs.prepare-end-to-end-tests.outputs.integration-tests) }}
steps:
- uses: actions/checkout@v3
- name: Download the build folders from prepare step
uses: actions/download-artifact@v3
with:
name: build
path: frontend/
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "pip"
- name: Setup backend
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python manage.py migrate --noinput
- name: Install frontend dependencies
working-directory: frontend
run: |
npm install
- name: Execute tests
uses: cypress-io/github-action@v5
with:
working-directory: frontend
install: false
start: python ../manage.py runserver
wait-on: "http://127.0.0.1:8000"
spec: ${{ matrix.spec }}