portails/.github/workflows/node.js-ci.yml

37 lines
721 B
YAML
Raw Normal View History

2023-04-18 15:31:08 +02:00
name: Continuous Integration - Action
2020-11-05 10:09:20 +01:00
on:
push:
branches: master
2020-11-05 10:09:20 +01:00
pull_request:
branches: master
2020-11-05 10:09:20 +01:00
jobs:
build:
2020-11-05 10:49:50 +01:00
runs-on: ${{ matrix.os }}
2020-11-05 10:09:20 +01:00
strategy:
matrix:
2020-11-05 10:49:50 +01:00
os: [ubuntu-latest, windows-latest, macos-latest]
2023-04-18 15:31:08 +02:00
node-version: [16.x, 18.x]
2020-11-05 10:09:20 +01:00
steps:
2023-04-18 15:31:08 +02:00
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7
2020-11-05 10:09:20 +01:00
2023-04-18 15:31:08 +02:00
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
2020-11-05 10:18:10 +01:00
with:
2023-04-18 15:31:08 +02:00
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
2020-11-05 10:09:20 +01:00
- name: Install dependencies
2023-04-18 15:31:08 +02:00
run: pnpm install
2023-04-18 15:31:08 +02:00
- name: Run test script
run: pnpm test
2020-11-05 10:09:20 +01:00
- name: Build production website
2023-04-18 15:31:08 +02:00
run: pnpm build