Skip to content

Commit

Permalink
impr(ci): started to use github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
litil committed Jun 8, 2023
1 parent 2f340ff commit 34fee93
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/pull-requests
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// caching: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows

name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
bootstrap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- name: Install dependencies
run: npm ci

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- name: Test
run: npm test

coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- run: sudo apt-get install libjq1 jq bc
- run: npm coverage
- run:
name: Publish coverage on PR
command: |
export PATH="$PATH:~/.local/bin"
bash ./scripts/post-coverage-to-github.sh $GITHUB_HEAD_REF

build-prod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- name: Build
run: npm build

0 comments on commit 34fee93

Please sign in to comment.