Skip to content

Commit

Permalink
ci!: migrate to fastify reusable workflow (#35)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: drops support for node 10 and 12; adds support for node 18
  • Loading branch information
Fdawgs committed May 25, 2022
1 parent 3adadb0 commit 438e158
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 71 deletions.
71 changes: 1 addition & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,75 +10,6 @@ on:
- 'docs/**'
- '*.md'

env:
CI: true
COVERALLS: 0

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Maintenance and active LTS
node-version: [10, 12, 14, 16]
os: [ubuntu-latest, windows-latest, macOS-latest]
name: Node ${{ matrix.node-version }}

steps:
- uses: actions/checkout@v3

- name: Use Node.js
id: setup_node
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
id: install
run: npm install --ignore-scripts

- name: Check licenses
id: license_check
run: |
npm run license-checker --if-present
# Unit and lint tests
- name: Tests
id: test
run: npm run test:ci

- name: Coveralls Parallel
id: coveralls-parallel
continue-on-error: true
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel: true
flag-name: run-${{ matrix.node-version }}-${{ matrix.os }}

- name: Should Trigger coverallsapp/github-action@master
id: coveralls-trigger
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#steps-context
# when continue-on-error failed, outcome is failure and conclusion is success
if: steps.coveralls-parallel.conclusion == 'success' && steps.coveralls-parallel.outcome != 'success'
run: |
echo "::set-output name=COVERALLS_TRIGGER::failure"
coverage:
needs: test
runs-on: ubuntu-latest
if: needs.test.outputs.COVERALLS != 'failure'
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

automerge:
needs: test
runs-on: ubuntu-latest
steps:
- uses: fastify/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v3
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<div align="center">

[![CI](https://github.com/fastify/fastify/workflows/ci/badge.svg)](https://github.com/fastify/fast-uri/actions/workflows/ci.yml)
[![Coverage Status](https://coveralls.io/repos/github/fastify/fast-uri/badge.svg?branch=add_coveralls)](https://coveralls.io/github/fastify/fast-uri?branch=main)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)

</div>
Expand Down

0 comments on commit 438e158

Please sign in to comment.