-
Notifications
You must be signed in to change notification settings - Fork 5
35 lines (32 loc) · 1.41 KB
/
tests.yml
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
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Tests and Linting
on: [pull_request]
jobs:
# ==============================================================================
# JOB: TEST
# ==============================================================================
test:
name: Automated Tests and Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Use Node.js 18"
uses: "actions/setup-node@v3"
with:
node-version: "18"
- name: "Get yarn cache directory path"
id: "yarn-cache-dir-path"
run: 'echo "dir=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT"'
- name: "Restore yarn cache"
uses: "actions/cache@v3"
id: "yarn-cache"
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}-
- run: "yarn install --immutable"
- uses: ./.github/actions/tests