Skip to content

Commit

Permalink
Merge pull request #360 from bcgov/feature/github-action-workflow-tes…
Browse files Browse the repository at this point in the history
…t-react-components

Add GitHub Actions workflow for testing React components
  • Loading branch information
ty2k authored May 28, 2024
2 parents 605c388 + 60cda50 commit a8d6337
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/test_react_component_library.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Run test suite for React component library

on:
pull_request:
paths:
- packages/react-components/**
workflow_dispatch:

# Cancel any currently running builds to save GitHub Actions hours.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
react-components-test:
name: Test suite run
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Read .nvmrc
run: echo "::set-output name=NVMRC::$(cat .nvmrc)"
id: nvm

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"

- name: Install dependencies
run: npm install

- name: Run test suite with npm script
run: npm run test:ci
2 changes: 1 addition & 1 deletion packages/react-components/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
20

0 comments on commit a8d6337

Please sign in to comment.