Merge pull request #96 from Frederisk/dependabot/npm_and_yarn/path-to… #85
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
################################################################################################ | |
# Copyright (c) Rowe Wilson Frederisk Holme. All rights reserved. | |
# Licensed under the MIT License. See License.txt in the project root for license information. | |
################################################################################################ | |
--- | |
name: Build | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
# schedule: | |
# - cron: "35 23 * * 5" | |
jobs: | |
build-and-test: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# Node.js 10 has been deprecated since May 2020 | |
# Node.js 12 has been deprecated since Oct 2020 | |
# Node.js 14 has been deprecated since Oct 2021 | |
# Node.js 15 has been deprecated since Apr 2021 | |
# Node.js 16 has been deprecated since Oct 2023 | |
nodejs_version: [20, 22] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.nodejs_version }} | |
cache: 'yarn' | |
- name: Initialize | |
shell: bash | |
# export DISPLAY=':99.0' | |
# usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | |
run: yarn install | |
- name: Test for Linux | |
if: runner.os == 'Linux' | |
shell: bash | |
run: xvfb-run -a yarn run test | |
- name: Test for else | |
if: runner.os != 'Linux' | |
shell: bash | |
run: yarn run test |