Skip to content

Commit

Permalink
add test CI
Browse files Browse the repository at this point in the history
  • Loading branch information
shunjizhan committed Jul 18, 2023
1 parent 2d0af71 commit 7643d09
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
Expand All @@ -27,6 +29,7 @@ jobs:
type=semver,pattern={{raw}}
type=raw,value={{sha}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push
uses: docker/build-push-action@v3
with:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run Tests and Show Coverage Report

on:
push:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16

- name: setup yarn
run: npm install -g yarn

- name: install deps
run: yarn install --immutable

- name: run tests
run: yarn test:coverage

- name: upload coverage reports
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}


0 comments on commit 7643d09

Please sign in to comment.