Skip to content

Commit

Permalink
Update CI config
Browse files Browse the repository at this point in the history
* specify `FORCE_COLOR:2` so that we get colored output
* specify `fail-fast: false`
* switch to the actions tags when possible
* reindent
  • Loading branch information
XhmikosR committed Oct 14, 2021
1 parent 106fff8 commit 67a8e1d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 34 deletions.
45 changes: 23 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,31 @@ on:
required: true

env:
node_version: 14
NODE_VERSION: 14
FORCE_COLOR: 2

jobs:
version_and_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
# fetch full history so things like auto-changelog work properly
fetch-depth: 0
- name: Use Node.js ${{ env.node_version }}
uses: actions/setup-node@v2.4.1
with:
node-version: ${{ env.node_version }}
# setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
registry-url: 'https://registry.npmjs.org'
- run: npm i
- run: git status # getting odd dirty repo errors during version debug info
- run: git diff
- name: npm version && npm publish
uses: bcomnes/npm-bump@v2.0.2
with:
git_email: bcomnes@gmail.com
git_username: ${{ github.actor }}
newversion: ${{ github.event.inputs.newversion }}
github_token: ${{ secrets.GITHUB_TOKEN }} # built in actions token. Passed tp gh-release if in use.
npm_token: ${{ secrets.NPM_TOKEN }} # user set secret token generated at npm
- uses: actions/checkout@v2
with:
# fetch full history so things like auto-changelog work properly
fetch-depth: 0
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
# setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
registry-url: 'https://registry.npmjs.org'
- run: npm i
- run: git status # getting odd dirty repo errors during version debug info
- run: git diff
- name: npm version && npm publish
uses: bcomnes/npm-bump@v2
with:
git_email: bcomnes@gmail.com
git_username: ${{ github.actor }}
newversion: ${{ github.event.inputs.newversion }}
github_token: ${{ secrets.GITHUB_TOKEN }} # built in actions token. Passed tp gh-release if in use.
npm_token: ${{ secrets.NPM_TOKEN }} # user set secret token generated at npm
28 changes: 16 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,31 @@ name: tests

on: [pull_request, push]

env:
FORCE_COLOR: 2

jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node: [14, 12]

steps:
- uses: actions/checkout@v2.3.4
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2.4.1
with:
node-version: ${{ matrix.node }}
- run: npm i
- run: npm test
- uses: codecov/codecov-action@v2.1.0
if: ${{ github.event_name == 'pull_request' }}
with:
flags: ${{ matrix.os }}-${{ matrix.node }}
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm i
- run: npm test
- uses: codecov/codecov-action@v2
if: ${{ github.event_name == 'pull_request' }}
with:
flags: ${{ matrix.os }}-${{ matrix.node }}

automerge:
needs: test
Expand All @@ -31,4 +35,4 @@ jobs:
- uses: fastify/github-action-merge-dependabot@v2.5.0
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' && contains(github.head_ref, 'dependabot/github_actions') }}
with:
github-token: ${{secrets.github_token}}
github-token: ${{ secrets.github_token }}

0 comments on commit 67a8e1d

Please sign in to comment.