Skip to content

Feat/optimization

Feat/optimization #523

Workflow file for this run

name: Test webapp
on:
push:
branches:
- master
- main
pull_request:
branches: ["**"]
jobs:
Run-lint:
strategy:
fail-fast: true # Good to fail all fast if one of the matrix runs fails.
matrix:
node-version: [20]
python-version: ["3.10"]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set up Docker for hadolint-docker pre-commit
uses: docker/setup-buildx-action@v3
id: buildx
with:
install: true
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install and run pre-commit
uses: pre-commit/[email protected]
with:
extra_args: --all-files
Run-tests:
needs:
- Run-lint
runs-on: ubuntu-latest
timeout-minutes: 10
container:
image: cypress/browsers:node-20.14.0-chrome-126.0.6478.114-1-ff-127.0.1-edge-126.0.2592.61-1
options: --user 1001
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up default config files
run: cd src && cp config-examples/* config && for i in config/*-example.js; do mv -- "$i" "${i%-example.js}.js"; done
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Cache PNPM and Cypress
uses: actions/cache@v4
with:
path: |
~/.cache/Cypress
${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-cypress-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-cypress-store-
- name: Cypress install
uses: cypress-io/github-action@v6
with:
runTests: false
install-command: pnpm install --frozen-lockfile --silent
- name: Cypress info
run: pnpm cypress info
- name: Run tests
env:
ORSKEY: ${{ secrets.ORSKEY }}
BITLYLOGIN: ${{ secrets.BITLYLOGIN }}
BITLYAPIKEY: ${{ secrets.BITLYAPIKEY }}
run: pnpm test:ci