|
1 | 1 | name: Lint, test and build |
2 | 2 | on: [push] |
3 | 3 | jobs: |
4 | | - cache-dependencies: |
5 | | - runs-on: ubuntu-latest |
6 | | - steps: |
7 | | - - uses: actions/checkout@v3 |
8 | | - - name: Use Node.js ${{ matrix.node-version }} |
9 | | - uses: actions/setup-node@v3 |
10 | | - with: |
11 | | - node-version: ${{ matrix.node-version }} |
12 | | - cache: "npm" |
13 | | - - uses: actions/cache@v3 |
14 | | - with: |
15 | | - path: "**/node_modules" |
16 | | - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} |
17 | | - - name: Installing dependencies |
18 | | - run: npm ci |
| 4 | + cache-dependencies: |
| 5 | + runs-on: ubuntu-latest |
| 6 | + steps: |
| 7 | + - uses: actions/checkout@v4 |
| 8 | + - name: Use Node.js ${{ matrix.node-version }} |
| 9 | + uses: actions/setup-node@v6 |
| 10 | + with: |
| 11 | + node-version: ${{ matrix.node-version }} |
| 12 | + cache: 'npm' |
| 13 | + - uses: actions/cache@v4 |
| 14 | + with: |
| 15 | + path: '**/node_modules' |
| 16 | + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} |
| 17 | + - name: Installing dependencies |
| 18 | + run: npm ci |
19 | 19 |
|
20 | | - tsc-and-linting: |
21 | | - runs-on: ubuntu-latest |
22 | | - needs: cache-dependencies |
23 | | - steps: |
24 | | - - uses: actions/checkout@v3 |
25 | | - - name: Use Node.js ${{ matrix.node-version }} |
26 | | - uses: actions/setup-node@v3 |
27 | | - with: |
28 | | - node-version: ${{ matrix.node-version }} |
29 | | - cache: "npm" |
30 | | - - uses: actions/cache@v3 |
31 | | - with: |
32 | | - path: "**/node_modules" |
33 | | - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} |
34 | | - - name: Installing dependencies |
35 | | - run: npm ci |
36 | | - - run: npm run tsc |
37 | | - - run: npm run lint |
38 | | - - run: npm run prettier |
| 20 | + tsc-and-linting: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + needs: cache-dependencies |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + - name: Use Node.js ${{ matrix.node-version }} |
| 26 | + uses: actions/setup-node@v6 |
| 27 | + with: |
| 28 | + node-version: ${{ matrix.node-version }} |
| 29 | + cache: 'npm' |
| 30 | + - uses: actions/cache@v4 |
| 31 | + with: |
| 32 | + path: '**/node_modules' |
| 33 | + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} |
| 34 | + - name: Installing dependencies |
| 35 | + run: npm ci |
| 36 | + - run: npm run tsc |
| 37 | + - run: npm run lint |
| 38 | + - run: npm run prettier |
39 | 39 |
|
40 | | - unit-tests: |
41 | | - runs-on: ubuntu-latest |
42 | | - needs: cache-dependencies |
43 | | - steps: |
44 | | - - uses: actions/checkout@v3 |
45 | | - - name: Use Node.js ${{ matrix.node-version }} |
46 | | - uses: actions/setup-node@v3 |
47 | | - with: |
48 | | - node-version: ${{ matrix.node-version }} |
49 | | - cache: "npm" |
50 | | - - uses: actions/cache@v3 |
51 | | - with: |
52 | | - path: "**/node_modules" |
53 | | - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} |
54 | | - - name: Installing dependencies |
55 | | - run: npm ci |
56 | | - - run: npm run test |
| 40 | + unit-tests: |
| 41 | + runs-on: ubuntu-latest |
| 42 | + needs: cache-dependencies |
| 43 | + steps: |
| 44 | + - uses: actions/checkout@v4 |
| 45 | + - name: Use Node.js ${{ matrix.node-version }} |
| 46 | + uses: actions/setup-node@v6 |
| 47 | + with: |
| 48 | + node-version: ${{ matrix.node-version }} |
| 49 | + cache: 'npm' |
| 50 | + - uses: actions/cache@v4 |
| 51 | + with: |
| 52 | + path: '**/node_modules' |
| 53 | + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} |
| 54 | + - name: Installing dependencies |
| 55 | + run: npm ci |
| 56 | + - run: npm run test |
57 | 57 |
|
58 | | - build: |
59 | | - runs-on: ubuntu-latest |
60 | | - needs: cache-dependencies |
61 | | - steps: |
62 | | - - uses: actions/checkout@v3 |
63 | | - - name: Use Node.js ${{ matrix.node-version }} |
64 | | - uses: actions/setup-node@v3 |
65 | | - with: |
66 | | - node-version: ${{ matrix.node-version }} |
67 | | - cache: "npm" |
68 | | - - uses: actions/cache@v3 |
69 | | - with: |
70 | | - path: "**/node_modules" |
71 | | - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} |
72 | | - - name: Installing dependencies |
73 | | - run: npm ci |
74 | | - - run: npm run build |
| 58 | + build: |
| 59 | + runs-on: ubuntu-latest |
| 60 | + needs: cache-dependencies |
| 61 | + steps: |
| 62 | + - uses: actions/checkout@v4 |
| 63 | + - name: Use Node.js ${{ matrix.node-version }} |
| 64 | + uses: actions/setup-node@v6 |
| 65 | + with: |
| 66 | + node-version: ${{ matrix.node-version }} |
| 67 | + cache: 'npm' |
| 68 | + - uses: actions/cache@v4 |
| 69 | + with: |
| 70 | + path: '**/node_modules' |
| 71 | + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/package.json') }} |
| 72 | + - name: Installing dependencies |
| 73 | + run: npm ci |
| 74 | + - run: npm run build |
0 commit comments