Add configurable status codes #21
Workflow file for this run
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 and Test | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: false | |
default: 'warning' | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
# Trigger the workflow on pull request (only for the master branch) | |
# push: | |
# branches: | |
# - '**' | |
# paths-ignore: | |
# - '**/media/**' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- '**/media/**' | |
jobs: | |
build-and-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [18.x, 20.x] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Install Chrome | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y dpkg # To upgrade to dpkg >= 1.17.5ubuntu5.8, which fixes https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1730627 | |
sudo apt-get install -y libappindicator1 fonts-liberation | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo dpkg -i google-chrome*.deb | |
google-chrome --version | |
- name: Install Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm install | |
- name: Lint | |
run: npm run lint | |
- name: Test | |
run: npm test |