Skip to content

Commit

Permalink
feat(workflow): adding release and tests workflow (#36)
Browse files Browse the repository at this point in the history
Updated amex-jest-preset to 5.1.0 to support node16
  • Loading branch information
Matthew-Mallimo authored Jan 26, 2022
1 parent 27cc6bc commit f2fd422
Show file tree
Hide file tree
Showing 5 changed files with 4,434 additions and 4,533 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
branches:
- 5.x

jobs:
prepare:
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[skip ci]')"
steps:
- run: echo "${{ github.event.head_commit.message }}"
release:
needs: prepare
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Release
env:
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }}
GITHUB_TOKEN: ${{ secrets.PA_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
35 changes: 35 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Tests

on:
pull_request:
branches:
- 5.x

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '12.x', '14.x', '16.x' ]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v2
- run: |
git remote set-branches --add origin 5.x
git fetch
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: npm ci
env:
NODE_ENV: development
- name: Unit Tests
run: npm run test
env:
NODE_ENV: production
- name: Lockfile Lint Test
run: npm run test:lockfile
env:
NODE_ENV: production
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org
Loading

0 comments on commit f2fd422

Please sign in to comment.