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

[Feature] Github Actions workflows CI #8

Merged
merged 5 commits into from
Oct 10, 2021
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
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
pull_request:
branches: [main]

jobs:
continuous-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Install dependencies
run: yarn install --immutable --immutable-cache

- name: Check Lint
run: yarn lint

- name: Check Unit Test
run: yarn test:coverage

- name: Check e2e Test
uses: cypress-io/github-action@v2
with:
install: false
command: yarn test:e2e
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"test:coverage": "yarn test --watchAll=false --coverage",
"lint": "eslint --ext ts,tsx .",
"test:unit": "react-scripts test",
"test:coverage": "yarn test:unit --watchAll=false --coverage",
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"test:e2e": "start-server-and-test start http://localhost:3000 cypress:run",
Expand Down