Skip to content

Commit

Permalink
ci: add coveralls step (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
sripwoud authored Jul 11, 2024
1 parent 8dae5f9 commit ea2e051
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 59 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use asdf
25 changes: 5 additions & 20 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Static Analysis
name: validate
on:
pull_request:
branches: [main]
Expand All @@ -8,22 +8,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Bun
uses: oven-sh/setup-bun@v1

- name: Setup turbo cache
id: turbo-cache
uses: actions/cache@v3
with:
path: .turbo
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: turbo-${{ github.job }}-${{ github.ref_name }}-

- name: Install
run: bun install

- name: Validate
run: bun run validate
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun validate
38 changes: 10 additions & 28 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Test Coverage
name: test
on:
# push trigger required to get coveralls monitoring of default branch
# pull_request required to get PR comments
pull_request:
paths-ignore: ['**/*md', '**/*yaml', '**/*yml']
paths-ignore: ['**/*md', '**/*yaml', '!.github/workflows/test.yaml', '**/*yml']
push:
branches: [main]
paths-ignore: ['**/*md', '**/*yaml', '**/*yml']
Expand All @@ -13,30 +13,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Bun
uses: oven-sh/setup-bun@v1
with:
node-version: 19

- name: Setup turbo cache
id: turbo-cache
uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun test --coverage --coverage-reporter lcov --coverage-dir .
- name: Coveralls
uses: coverallsapp/github-action@v2.3.0
with:
path: .turbo
key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: turbo-${{ github.job }}-${{ github.ref_name }}-

- name: Install
run: bun install

- name: Test
run: bun run test
# no supported by bun test yet
# - name: Coveralls
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-lcov: ./coverage/lcov.info
format: lcov
file: lcov.info
11 changes: 1 addition & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
yarn.lock
node_modules

# TS build dir
dist

# Jest
coverage

# JetBrains IDE
.idea

lcov.info
.env

.turbo
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodejs 19.1.0
bun 1.0.9
bun 1.1.18

0 comments on commit ea2e051

Please sign in to comment.