-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (51 loc) · 1.37 KB
/
ci.yml
File metadata and controls
55 lines (51 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI
on:
push:
branches:
- main
- next
- beta
- alpha
pull_request:
branches:
- main
- next
- beta
- alpha
- '[0-9]*.[0-9x]*.x'
workflow_dispatch:
inputs:
project:
type: choice
description: Select project ( leave blank to run on all projects )
options:
- front-office
- back-office
- ui
- shared
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'npm'
- name: Get package version
id: get_version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Install Dependencies
run: npm ci
- name: Run ${{ github.event.inputs.project }} tests - ${{ steps.get_version.outputs.version }}
run: npx nx run ${{ github.event.inputs.project }}:test:ci --skip-nx-cache
if: ${{ github.event.inputs.project != '' }}
- name: Run all tests - ${{ steps.get_version.outputs.version }}
run: npm run test -- --skip-nx-cache
if: ${{ github.event.inputs.project == '' }}