-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Name of this action | ||
name: Vitest Automatic Testing | ||
|
||
# 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-vitest: | ||
# Name of the job as it will be displayed in GitHub | ||
name: Vitest | ||
# 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: | ||
# Reference the main branch. For more information visit https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsuses | ||
- name: Checkout under $GITHUB_WORKSPACE | ||
uses: actions/checkout@main | ||
|
||
# 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@v1 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install all dependencies | ||
run: npm install | ||
|
||
- name: Run Jest Tests | ||
run: npm run test | ||
|
||
- name: build | ||
env: | ||
BASE_PATH: '/${{ github.event.repository.name }}' | ||
run: | | ||
npm run build | ||
- name: Upload Artifacts | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
# this should match the `pages` option in your adapter-static options | ||
path: 'build/' |