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 ece2a1c
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/pull-requests
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// caching: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows

name:

on: [pull_request]

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 ece2a1c

Please sign in to comment.