-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mikaël Bouchez
committed
Jan 13, 2022
1 parent
0ba3d68
commit 838d598
Showing
19 changed files
with
2,664 additions
and
2,266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,55 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
name: Continuous integration | ||
on: | ||
push: | ||
pull_request: | ||
branches: [master] | ||
|
||
name: Node.js CI | ||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
strategy: | ||
matrix: | ||
node-version: [12.x, 14.x, 16.x] | ||
cucumber-version: [7.x, 8.x] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [12.x, 14.x, 16.x] | ||
cucumber-version: [7.x, 8.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: yarn add -P @cucumber/cucumber@${{ matrix.cucumber-version }} | ||
- run: yarn run lint | ||
- run: yarn run check-fmt | ||
- run: yarn run check-readme | ||
- run: yarn run test-cover | ||
- run: yarn run test-cli | ||
- run: yarn run examples --tags @offline | ||
- name: Coveralls Parallel | ||
env: | ||
COVERALLS_FLAG_NAME: run-${{ matrix.node-version }}-${{ matrix.cucumber-version }} | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
parallel: true | ||
|
||
coverall: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
parallel-finished: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: yarn add -P @cucumber/cucumber@${{ matrix.cucumber-version }} | ||
|
||
- name: Eslint | ||
run: yarn lint | ||
|
||
- name: Prettier | ||
run: yarn check-fmt | ||
|
||
- name: Tests | ||
run: yarn test-cli | ||
|
||
- name: Coverage | ||
run: yarn test-cover | ||
|
||
- name: Coveralls Parallel | ||
env: | ||
COVERALLS_FLAG_NAME: run-${{ matrix.node-version }}-${{ matrix.cucumber-version }} | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel: true | ||
|
||
coverall: | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
parallel-finished: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
strategy: | ||
description: Valid semver number <x.x.x> or strategy <patch, minor, major> | ||
default: "patch" | ||
required: false | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'pebie' || github.actor == 'Crow-EH' || github.actor == 'fthouraud' || github.actor == 'leguellec' || github.actor == 'rande' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Bump the version using input strategy | ||
run: yarn version ${{ github.event.inputs.strategy }} | ||
|
||
- name: Update changelog | ||
id: changelog | ||
run: | | ||
yarn install | ||
CHANGELOG=$(yarn conventional-changelog -p conventionalcommits -r -u 0) | ||
echo -e "${CHANGELOG}\n\n\n\n$(cat CHANGELOG.md)" > CHANGELOG.md | ||
BODY=$(echo -e "${CHANGELOG}" | sed -e "1,2d") | ||
echo "::set-output name=body::$(echo -e "${BODY}")" | ||
- name: Get version | ||
id: package-version | ||
uses: martinbeentjes/[email protected] | ||
|
||
- name: Create tag | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
git add . | ||
git commit -m "chore(bump): release v${{ steps.package-version.outputs.current-version }}" | ||
git push | ||
git tag -a v${{ steps.package-version.outputs.current-version }} -m "chore(tag): release v${{ steps.package-version.outputs.current-version }}" | ||
git push origin v${{ steps.package-version.outputs.current-version }} | ||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body: ${{ steps.changelog.outputs.body }} | ||
tag_name: v${{ steps.package-version.outputs.current-version }} | ||
name: Release v${{ steps.package-version.outputs.current-version }} | ||
|
||
- name: Publish to NPM | ||
run: npm publish --access public | ||
env: | ||
VERSION: ${{ steps.package-version.outputs.current-version }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
yarnPath: .yarn/releases/yarn-3.1.0.cjs | ||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs | ||
spec: "@yarnpkg/plugin-version" | ||
|
||
yarnPath: .yarn/releases/yarn-3.0.2.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.