Skip to content

Update dev Graphemes API deployment to use GHCR #40

Update dev Graphemes API deployment to use GHCR

Update dev Graphemes API deployment to use GHCR #40

---
name: Test graphemes-api
# Limit GITHUB_TOKEN permissions to only read repo contents.
permissions:
contents: read
on:
pull_request:
paths:
- graphemes-api/**
workflow_dispatch:
# Cancel any currently running builds to save GitHub Actions hours.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-suite:
name: Test suite
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./graphemes-api
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Read .nvmrc
run: echo "GITHUB_NVMRC_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.GITHUB_NVMRC_VERSION }}
- name: Install dependencies
run: npm install
# Lint errors cause this job to fail.
- name: Run lint script
run: npm run lint
# Test failures cause this job to fail.
- name: Run test script
run: npm run test
# Build failures cause this job to fail.
# We don't care about keeping the artifact of this build,
# just that it can complete.
- name: Run build script
run: npm run build