Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up CI for end to end test #28

Merged
merged 8 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/actions/setup-yarn/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Setup by yarn'
description: 'Setup dependencies for this project'
runs:
using: 'composite'
steps:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'yarn'
- run: yarn install --immutable --immutable-cache # If accept PR from third party in future, please also add --check-cache
shell: bash
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml → .github/workflows/common.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
on: [push]
name: Common checks
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'yarn'
- run: yarn install --immutable --immutable-cache # If accept PR from third party in future, please also add --check-cache
- uses: ./.github/actions/setup-yarn
- name: Linting
run: yarn lint
- name: Type checking
run: yarn ts:check
- name: Check formatting
run: yarn format:check
- name: Run tests
- name: Run unit tests
run: yarn test:ci
14 changes: 14 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on:
pull_request:
branches: [main]
name: End to end tests
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-yarn
- name: Build
run: yarn build
- name: Run end to end tests
run: yarn e2e:headless