Upgrade Django to v4.2 #1166
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ '**' ] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
Server_Side_Unit_Tests: | |
runs-on: ubuntu-22.04 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Fetch base and install Poetry | |
run: | | |
git fetch origin ${{github.base_ref}} | |
pipx install poetry | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'poetry' | |
- name: Copy base.html for use in unit tests | |
run: | | |
cp --force designsafe/templates/base.j2 designsafe/templates/base.html | |
- run: | | |
poetry install | |
- name: Run Server-side linting with pytest | |
# Only run on new files for now-- for all changes, filter is ACMRTUXB | |
# Check manage.py to prevent a crash if no files are selected. | |
run: | | |
poetry run pylint $(git diff --name-only --diff-filter=A origin/${{github.base_ref}} | grep -E "(.py$)") manage.py | |
- name: Run Server-side formatting with black | |
run: | | |
poetry run black $(git diff --name-only --diff-filter=A origin/${{github.base_ref}} | grep -E "(.py$)") manage.py --check | |
- name: Run Server-side unit tests and generate coverage report | |
run: | | |
poetry run pytest --cov-config=.coveragerc --cov=designsafe --cov-report=xml -ra designsafe | |
Client_Side_Unit_Tests: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js for use with actions | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
cache: npm | |
- run: npm ci | |
- run: npm run test |