-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (57 loc) · 1.76 KB
/
Copy pathjavascript--ci.yml
File metadata and controls
61 lines (57 loc) · 1.76 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
56
57
58
59
60
61
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: JavaScript - CI
on:
push:
branches:
- master
paths:
- .github/workflows/javascript--ci.yml
- .node-version
- javascript/package.json
- javascript/pnpm-lock.yaml
- javascript/pnpm-workspace.yaml
- javascript/**/*.js
pull_request:
paths:
- .github/workflows/javascript--ci.yml
- .node-version
- javascript/package.json
- javascript/pnpm-lock.yaml
- javascript/pnpm-workspace.yaml
- javascript/**/*.js
permissions:
contents: read
pull-requests: read
jobs:
change-detection:
runs-on: ubuntu-latest
outputs:
javascript-changes: ${{ steps.change-detection.outputs.javascript }}
steps:
- uses: actions/checkout@v7
- name: Change Detection
uses: dorny/paths-filter@v4
id: change-detection
with:
filters: |
javascript:
- .github/workflows/javascript--ci.yml
- .node-version
- javascript/package.json
- javascript/pnpm-lock.yaml
- javascript/pnpm-workspace.yaml
- javascript/**/*.js
jest:
timeout-minutes: 10
runs-on: ubuntu-latest
needs: change-detection
if: needs.change-detection.outputs.javascript-changes == 'true'
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup-nodejs
with:
working-directory: ./javascript
- name: Jest
working-directory: ./javascript
run: pnpm exec jest