Skip to content

Commit

Permalink
Merge pull request #908 from syucream/feature/frontend-ci-on-gha
Browse files Browse the repository at this point in the history
Migrate FE CI from CircleCI to GitHub Actions
  • Loading branch information
hinashi authored Aug 14, 2023
2 parents dfe5744 + 3728269 commit 07b65f4
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 25 deletions.
25 changes: 1 addition & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,32 +91,9 @@ jobs:
. virtualenv/bin/activate
tox
frontend:
docker:
- image: cimg/node:18.12
steps:
- checkout
- run:
name: Resolve dependency
command: |
npm install
- run:
name: lint
command: |
npm run lint
- run:
name: build
command: |
npm run build:development
- run:
name: test
command: |
npm run test:ci
workflows:
version: 2
build_and_test:
jobs:
- python38
- staticchecks
- frontend
- staticchecks
49 changes: 49 additions & 0 deletions .github/workflows/build-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build frontend

on:
push:
branches:
- master
pull_request:
paths:
- 'frontend/**/*.ts'
- 'frontend/**/*.tsx'
- '.github/workflows/build-frontend.yml'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: install dependencies
run: npm ci
- name: lint
run: npm run lint
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: install dependencies
run: npm ci
- name: build
run: npm run build:development
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: install dependencies
run: npm ci
- name: test
run: npm run test
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"lint": "npx eslint frontend && npx prettier --check frontend",
"fix": "npx eslint --fix frontend ; npx prettier --write frontend",
"test": "TZ=UTC npx jest frontend",
"test:ci": "TZ=UTC npx jest frontend --runInBand",
"test:update": "TZ=UTC npx jest -u frontend"
},
"repository": {
Expand Down

0 comments on commit 07b65f4

Please sign in to comment.