Add test workflow #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Jekyll site and run Cypress tests | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ['TD-1-cypress'] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: '20' | |
run: npm ci | |
- name: Cypress run | |
uses: cypress-io/github-action@v6 | |
with: | |
start: npm start | |
wait-on: 'http://localhost:4000' |