Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI config #62

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}