Skip to content

fix/the api fixes (#2305) #1178

fix/the api fixes (#2305)

fix/the api fixes (#2305) #1178

Workflow file for this run

# Build a cache of build artifacts after PRs to speed up subsequent builds
name: cache
on:
push:
branches: [main, dev, staging]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.PROSOPONATOR_PAT }}
GH_TOKEN: ${{ secrets.PROSOPONATOR_PAT }}
CARGO_TERM_COLOR: always
NODE_OPTIONS: "--max-old-space-size=4096"
NODE_ENV: "test"
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Print contexts
uses: prosopo/captcha/.github/actions/print_contexts@gha
with:
INPUTS_CONTEXT: ${{ toJson(inputs) }}
NEEDS_CONTEXT: ${{ toJson(needs) }}
VARS_CONTEXT: ${{ toJson(vars) }}
SECRETS_CONTEXT: ${{ toJson(secrets) }}
- name: Set NX_PARALLEL environment variable
run: echo "NX_PARALLEL=$(nproc)" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
submodules: "recursive"
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'
# don't restore the cache, otherwise we get artifacts left over from the previous run sit in the cache for eternity. Do a clean build every time.
- run: npm cache clean --force
- uses: prosopo/captcha/.github/actions/npm@gha
with:
npm_ci_args: '--include=dev'
# clean the nx cache
- run: npx nx reset
- run: npm run clean:turbo
# install cypress so we don't have to do that every time
- run: npx cypress install
# build everything so it's cached
- run: npx turbo run typecheck
- run: npx turbo run build
- run: npx turbo run build:cjs
- run: npx turbo run bundle
- run: NODE_ENV=development npx turbo run bundle:webpack
- name: Save npm cache
uses: prosopo/captcha/.github/actions/save_npm_cache@gha