-
Notifications
You must be signed in to change notification settings - Fork 32
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
3 changed files
with
18 additions
and
75 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 |
---|---|---|
@@ -1,72 +1,31 @@ | ||
name: CI | ||
|
||
|
||
name: 'ci' | ||
on: | ||
push: | ||
branches: [main] | ||
branches: | ||
- main | ||
pull_request: | ||
branches: [main] | ||
|
||
branches: | ||
- main | ||
jobs: | ||
ci: | ||
# The type of runner that the job will run on | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
## Yarn dir | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
## Cache | ||
- name: Cache yarn cache | ||
uses: actions/cache@v2 | ||
id: cache-yarn-cache2 | ||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn2-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn2- | ||
version: 6.16.1 | ||
|
||
## Cache | ||
- name: Cache node_modules | ||
id: cache-node-modules2 | ||
uses: actions/cache@v2 | ||
- name: Set node version to 16 | ||
uses: actions/setup-node@v2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules2-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.node-version }}-nodemodules2- | ||
node-version: 16 | ||
cache: 'pnpm' | ||
|
||
## Cache | ||
- name: Cache Cypress | ||
id: cache-cypress2 | ||
uses: actions/cache@v2 | ||
with: | ||
path: /home/runner/.cache/Cypress | ||
key: ${{ runner.os }}-${{ matrix.node-version }}-cypress2-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.node-version }}-cypress2- | ||
- run: pnpm install | ||
|
||
## Dependencies | ||
- name: Install Dependencies | ||
if: | | ||
steps.cache-yarn-cache.outputs.cache-hit != 'true' || | ||
steps.cache-node-modules.outputs.cache-hit != 'true' | ||
run: yarn | ||
|
||
## Test | ||
- name: Start Vite devserver | ||
run: yarn start | ||
|
||
- name: Run tests | ||
run: yarn test:ci | ||
|
||
- name: Upload artifacts on fail | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: videos | ||
path: cypress/videos/ | ||
- name: Run unit tests | ||
run: pnpm run test:unit |
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
This file was deleted.
Oops, something went wrong.