forked from joeferner/node-java-maven
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.04 KB
/
main.yml
File metadata and controls
37 lines (35 loc) · 1.04 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
on: [push, pull_request]
name: CI
jobs:
node-jdbc:
name: node-jdbc
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node_version:
- 18
- 20
steps:
- name: 🧶 Get yarn cache directory path 🧶
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"
- name: 💵 Cache 💵
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.node_version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node_version }}-yarn-
${{ runner.os }}-yarn-
- name: ☑️ Checkout ☑️
uses: actions/checkout@v4
- name: 🔋 Node 🔋
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- name: 💾 Install 💾
run: yarn install
- name: 🧪 Test 🧪
run: yarn test