Skip to content

Allow Prolific participants to re-join experiments. #1448

Allow Prolific participants to re-join experiments.

Allow Prolific participants to re-join experiments. #1448

Workflow file for this run

name: Check format and run tests
on: [push, pull_request]
jobs:
format:
name: Check format
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm install
- name: Check format
run: |
npx prettier --check "**/*.ts"
npx eslint --quiet "**/*.ts"
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Set up Java 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Install firebase
run: |
npm install -g firebase-tools
- name: Install dependencies
run: npm install
- name: Build utils
working-directory: ./utils
run: npm run build
- name: Build functions
working-directory: ./functions
run: npm run build
- name: Test utils
working-directory: ./utils
run: npm test
- name: Test functions
working-directory: ./functions
run: npm test
- name: Test frontend
working-directory: ./frontend
run: npm test
schemas:
name: Check generated schemas are up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install dependencies
run: |
npm install
cd scripts && uv sync
- name: Regenerate schemas
run: npm run update-schemas
- name: Check for diff
run: |
if ! git diff --exit-code docs/assets/api/schemas.json scripts/deliberate_lab/types.py; then
echo ""
echo "Generated schemas are out of date. Please run 'npm run update-schemas' and commit the changes."
exit 1
fi