Skip to content

Commit

Permalink
update lint and test GitHub Action workflow
Browse files Browse the repository at this point in the history
- update actions to latest versions
- use Node 14 instead of 12
- use 2 spaces instead of 4
  • Loading branch information
TimidRobot committed Apr 11, 2024
1 parent 78a7807 commit 4fdf949
Showing 1 changed file with 35 additions and 27 deletions.
62 changes: 35 additions & 27 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
name: Lint and Test

on: pull_request
on:
pull_request:
push:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Run npm install
run: npm ci

- name: Lint
run: npm run lint

- name: Test
run: npm run test:unit
env:
CI: true
- name: Cypress run
uses: cypress-io/[email protected]
with:
start: npm run serve
wait-on: 'http://localhost:8080'
build:
runs-on: ubuntu-latest

steps:
# https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@v4

# https://github.com/actions/setup-node
- name: Use Node.js 14
uses: actions/setup-node@v4
with:
node-version: '14'

- name: Clean install NPM packages from package-lock.json
run: npm ci

- name: Lint
run: npm run lint

- name: Test
run: npm run test:unit
env:
CI: true

# https://github.com/cypress-io/github-action
- name: Cypress run
uses: cypress-io/github-action@v6
with:
start: npm run serve
wait-on: 'http://localhost:8080'

0 comments on commit 4fdf949

Please sign in to comment.