Skip to content

Commit

Permalink
Merge 7d64a7b into 0ba3d68
Browse files Browse the repository at this point in the history
  • Loading branch information
pebie committed Jan 13, 2022
2 parents 0ba3d68 + 7d64a7b commit bc65886
Show file tree
Hide file tree
Showing 19 changed files with 2,665 additions and 2,266 deletions.
100 changes: 53 additions & 47 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,56 @@
# 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/github-action@v1.1.1
with:
github-token: ${{ secrets.github_token }}
parallel: true

coverall:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v1.1.1
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/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true

coverall:
needs: tests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v1.1.1
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true

57 changes: 57 additions & 0 deletions .github/workflows/release.yml
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/npm-get-version-action@v1.1.0

- 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 }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ _doc

# yarn
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*

!bin/veggies.js
events.json
77 changes: 0 additions & 77 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

367 changes: 367 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

Large diffs are not rendered by default.

631 changes: 631 additions & 0 deletions .yarn/releases/yarn-3.0.2.cjs

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions .yarn/sdks/eslint/lib/api.js

This file was deleted.

6 changes: 0 additions & 6 deletions .yarn/sdks/eslint/package.json

This file was deleted.

5 changes: 0 additions & 5 deletions .yarn/sdks/integrations.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .yarn/sdks/prettier/index.js

This file was deleted.

6 changes: 0 additions & 6 deletions .yarn/sdks/prettier/package.json

This file was deleted.

6 changes: 5 additions & 1 deletion .yarnrc.yml
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
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,3 @@
* docs(post): add documentation about posting data ([fe2625e](https://github.com/ekino/veggies/commit/fe2625e))
* docs(toc): improve README TOC ([b8c11c9](https://github.com/ekino/veggies/commit/b8c11c9))
* docs(type system): add documentation about type system ([e854a25](https://github.com/ekino/veggies/commit/e854a25))



57 changes: 0 additions & 57 deletions Makefile

This file was deleted.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"babylon": "6.x",
"chalk": "4.x",
"commitlint": "12.x",
"conventional-changelog": "^3.1.24",
"conventional-changelog-cli": "2.x",
"coveralls": "3.x",
"eslint": "7.x",
Expand All @@ -69,7 +70,6 @@
"test": "jest --verbose --colors tests",
"test-cover": "jest --verbose --colors --coverage",
"test-cli": "veggies --require tests/cli/support tests/cli/features",
"coverage": "cat ./coverage/lcov.info | coveralls",
"fmt": "prettier --print-width 100 --tab-width=4 --single-quote --bracket-spacing --no-semi --color --write \"{src,tests,scripts}/**/*.js\"",
"check-fmt": "prettier --print-width 100 --tab-width=4 --single-quote --bracket-spacing --no-semi --list-different \"{src,tests,scripts}/**/*.js\"",
"lint": "eslint .",
Expand All @@ -78,7 +78,6 @@
"check-readme": "node scripts/generate_readme --check",
"doc": "jsdoc -c .jsdoc.json --verbose",
"doc-pub": "yarn run readme && yarn run doc && gh-pages -d _doc",
"examples": "veggies --require examples/support examples/features",
"changelog": "conventional-changelog -p conventionalcommits -i CHANGELOG.md -s"
"examples": "veggies --require examples/support examples/features"
}
}
12 changes: 6 additions & 6 deletions src/extensions/cli/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ exports.install = () => {
this.cli.setCwd(cwd)
})

Given(/^(?:I )?set ([^ ]+) (?:env|environment) (?:var|variable) to (.+)$/, function (
name,
value
) {
this.cli.setEnvironmentVariable(name, value)
})
Given(
/^(?:I )?set ([^ ]+) (?:env|environment) (?:var|variable) to (.+)$/,
function (name, value) {
this.cli.setEnvironmentVariable(name, value)
}
)

Given(/^(?:I )?set (?:env|environment) (?:vars|variables)$/, function (step) {
this.cli.setEnvironmentVariables(step.rowsHash())
Expand Down

0 comments on commit bc65886

Please sign in to comment.