Skip to content

Commit

Permalink
ci: move to github actions (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-zg committed Jun 2, 2022
1 parent a65dbfd commit 64ecd64
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches:
- 'develop'
pull_request:
types: [review_requested, ready_for_review]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn run lint
- run: yarn run build
- run: yarn run test:coverage:report
36 changes: 36 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package

on:
push:
branches:
- 'master'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install --frozen-lockfile
- run: yarn run lint
- run: yarn run build
- run: yarn run test

publish-npm:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: yarn install --frozen-lockfile
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
5 changes: 2 additions & 3 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": [
"config:base"
]
"extends": ["config:base"],
"reviewers": ["arnaud-zg"]
}

0 comments on commit 64ecd64

Please sign in to comment.