Repository navigation
46 lines (38 loc) · 1.73 KB
/
Copy pathtest.yml
File metadata and controls
46 lines (38 loc) · 1.73 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
# Name of this action
name: Build and Test
# Event triggers on pull request event
# For more detail visit https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on
on: pull_request
# The jobs this action will run. You can write as many jobs as you want.
# For more detail on this section visit https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobs
jobs:
# ID of the job
run-test:
# Name of the job as it will be displayed in GitHub
name: Automatic Testing
# Machine which this action will be run on. For a list of all the machines available/how to run on self hosted machine visit
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
runs-on: ubuntu-latest
# Steps this job must take to complete
steps:
# Pinned to a release rather than @main: an action tracked from a branch
# changes our CI whenever upstream changes, without a commit here.
- name: Checkout under $GITHUB_WORKSPACE
uses: actions/checkout@v7
# Specify which version of Node this project is using. For more information visit.
# https://docs.github.com/en/actions/guides/building-and-testing-nodejs#specifying-the-nodejs-version
- name: Set up NodeJS
uses: actions/setup-node@v7
with:
node-version: 22
- name: Install all dependencies
run: npm install
- name: Check svelte-kit and typescript
run: npm run check
- name: build
run: |
npm run build
# The build-output guards read build/: indexed URLs, the feed, one
# canonical per page, nothing hidden on the pages that ship no JS.
- name: test
run: npx vitest run