Skip to content

Commit

Permalink
chore: update github actions
Browse files Browse the repository at this point in the history
Closes: #656, #628 
Signed-off-by: Tomás Migone <[email protected]>
  • Loading branch information
tmigone authored Sep 6, 2022
1 parent 07c0790 commit 455aa4e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 30 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/npmtest.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Node.js CI
name: Run CI tests

on:
push:
Expand All @@ -11,18 +11,16 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install packages
run: yarn install --non-interactive --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- name: Run tests
run: yarn test:coverage
- name: Upload coverage report
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run E2E tests

on:
push:
branches: [dev]
pull_request: {}

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install packages
run: yarn install --non-interactive --frozen-lockfile
- name: Run e2e tests
run: ADDRESS_BOOK=addresses.json yarn test:e2e
34 changes: 10 additions & 24 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,23 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
- run: npm ci
- run: npm test
node-version: 16
- run: yarn install --non-interactive --frozen-lockfile
- run: yarn test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: 12
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish --access=restricted
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish --access=restricted
- run: yarn install --non-interactive --frozen-lockfile
- run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 comments on commit 455aa4e

Please sign in to comment.