Skip to content

Node.js 18, pnpm 8, jest 29, linting/formatting updates, and webpack fixes #4497

Node.js 18, pnpm 8, jest 29, linting/formatting updates, and webpack fixes

Node.js 18, pnpm 8, jest 29, linting/formatting updates, and webpack fixes #4497

Workflow file for this run

name: Build and deploy tests
on:
push:
branches:
- unstable
- hotfixes
- master
pull_request:
jobs:
pre_job:
name: Path match check
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ github.token }}
paths: '["**.py", "requirements.txt", ".github/workflows/deploytest.yml", "**.vue", "**.js", "pnpm-lock.yaml", "package.json"]'
build_assets:
name: Build frontend assets
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use pnpm
uses: pnpm/action-setup@v2
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: 'pnpm'
- name: Install dependencies
run: |
pnpm install --frozen-lockfile
npm rebuild node-sass
- name: Build frontend
run: pnpm run build
make_messages:
name: Build all message files
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use pnpm
uses: pnpm/action-setup@v2
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: pip cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pyprod-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pyprod-
- name: Install pip-tools and python dependencies
run: |
python -m pip install --upgrade pip
pip install pip-tools
pip-sync requirements.txt
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: 'pnpm'
- name: Install node dependencies
run: |
pnpm install --frozen-lockfile
npm rebuild node-sass
- name: Install gettext
run: |
sudo apt-get update -y
sudo apt-get install -y gettext
- name: Test Django makemessages
run: python contentcuration/manage.py makemessages --all