-
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup building and releasing with Github Actions (#3)
With Github Actions each language is build and tested independently from the others. This significantly releases the complexity of the build environment needed. Additionally, for the same reason, code generation is no longer included in the build process. Rather all generated files are checked in. Two seperate make command exists to copy gherkin-languages.json and generate parsers using Berp.
- Loading branch information
1 parent
c35db4a
commit 1cc2ef0
Showing
175 changed files
with
4,546 additions
and
14,312 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": [ | ||
"config:base", | ||
":preserveSemverRanges", | ||
":rebaseStalePrs", | ||
":disableDependencyDashboard" | ||
], | ||
"labels": [":robot: dependencies"], | ||
"prHourlyLimit": 0, | ||
"packageRules": [ | ||
{ | ||
"depTypeList": ["devDependencies", "dependencies"], | ||
"updateTypes": ["minor", "patch"], | ||
"automerge": true, | ||
"automergeType": "branch" | ||
} | ||
] | ||
} |
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,20 @@ | ||
name: Release Perl/CPAN | ||
|
||
on: | ||
push: | ||
branches: [release/*] | ||
|
||
jobs: | ||
create-perl-release: | ||
name: Publish to CPAN | ||
runs-on: ubuntu-latest | ||
environment: Release | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cucumber/[email protected] | ||
with: | ||
cpan-user: ${{ secrets.CPAN_USER }} | ||
cpan-password: ${{ secrets.CPAN_PASSWORD }} | ||
working-directory: 'perl' |
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,18 @@ | ||
name: Release GitHub | ||
|
||
on: | ||
push: | ||
branches: [release/*] | ||
|
||
jobs: | ||
create-github-release: | ||
name: Create GitHub Release and Git tag | ||
runs-on: ubuntu-latest | ||
environment: Release | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cucumber/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Release Go | ||
|
||
on: | ||
push: | ||
branches: [release/*] | ||
|
||
jobs: | ||
read-version: | ||
name: Read version to release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.versions.outputs.changelog-latest-version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cucumber/[email protected] | ||
id: versions | ||
|
||
publish-go: | ||
name: Create go/v* tag | ||
runs-on: ubuntu-latest | ||
needs: read-version | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Create git tag | ||
run: | | ||
git tag "go/v${{ needs.read-version.outputs.version }}" | ||
git push --tags |
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,28 @@ | ||
name: Release Elixir hex package | ||
|
||
on: | ||
push: | ||
branches: [release/*] | ||
|
||
jobs: | ||
create-hex-release: | ||
name: Publish to hex.pm | ||
runs-on: ubuntu-latest | ||
environment: Release | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: '22.2' | ||
elixir-version: '1.10.x' | ||
|
||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
|
||
- uses: cucumber/[email protected] | ||
with: | ||
hex-api-key: ${{ secrets.HEX_API_KEY }} | ||
working-directory: 'elixir' |
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,25 @@ | ||
name: Release Maven | ||
|
||
on: | ||
push: | ||
branches: [release/*] | ||
|
||
jobs: | ||
publish-mvn: | ||
name: Publish Maven Package | ||
runs-on: ubuntu-latest | ||
environment: Release | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
cache: 'maven' | ||
- uses: cucumber/[email protected] | ||
with: | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
nexus-username: cukebot | ||
nexus-password: ${{ secrets.SONATYPE_PASSWORD }} | ||
working-directory: java |
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,24 @@ | ||
name: Release NPM | ||
|
||
on: | ||
push: | ||
branches: [release/*] | ||
|
||
jobs: | ||
publish-npm: | ||
name: Publish NPM module | ||
runs-on: ubuntu-latest | ||
environment: Release | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: 'npm' | ||
cache-dependency-path: javascript/package-lock.json | ||
- run: npm install-test | ||
working-directory: javascript | ||
- uses: cucumber/[email protected] | ||
with: | ||
npm-token: ${{ secrets.NPM_TOKEN }} | ||
working-directory: javascript |
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,22 @@ | ||
name: Release NuGet | ||
|
||
on: | ||
push: | ||
branches: | ||
- "release/*" | ||
|
||
jobs: | ||
publish-nuget: | ||
name: Publish package to NuGet.org | ||
runs-on: ubuntu-latest | ||
environment: Release | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 6.0.x | ||
- uses: cucumber/[email protected] | ||
with: | ||
nuget-api-key: ${{ secrets.NUGET_API_KEY }} | ||
working-directory: "dotnet" |
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,21 @@ | ||
name: Release PHP | ||
|
||
on: | ||
push: | ||
branches: [release/*] | ||
|
||
jobs: | ||
create-php-release: | ||
name: Publish to PHP subrepo | ||
runs-on: ubuntu-latest | ||
environment: Release | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: '0' | ||
- uses: cucumber/[email protected] | ||
with: | ||
working-directory: php | ||
github-token: ${{ secrets.CUKEBOT_GITHUB_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Release RubyGems | ||
|
||
on: | ||
push: | ||
branches: [release/*] | ||
|
||
jobs: | ||
publish-rubygem: | ||
name: Publish Ruby Gem | ||
runs-on: ubuntu-latest | ||
environment: Release | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.0.2' | ||
bundler-cache: true | ||
- uses: cucumber/[email protected] | ||
with: | ||
rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }} | ||
working_directory: ruby |
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,22 @@ | ||
name: test-c | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- renovate/** | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_call: | ||
|
||
jobs: | ||
test-c: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: run make | ||
run: make | ||
working-directory: c |
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,41 @@ | ||
name: test-codegen | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- renovate/** | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_call: | ||
|
||
jobs: | ||
test-codegen: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '5.0.x' | ||
|
||
- name: install berp | ||
run: | | ||
dotnet tool update Berp --version 1.3.0 --tool-path ~/bin | ||
echo "~/bin" >> $GITHUB_PATH | ||
- name: generate code for all languages | ||
run: | | ||
make clean-gherkin-languages | ||
make copy-gherkin-languages | ||
make clean-generate | ||
make generate | ||
- name: check the repo is still clean after generation | ||
run: | | ||
git status --porcelain | ||
git diff HEAD | ||
[ -z "$(git status --porcelain)" ] |
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,25 @@ | ||
name: test-dart | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- renovate/** | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_call: | ||
|
||
jobs: | ||
test-dart: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: install dart | ||
uses: dart-lang/[email protected] | ||
|
||
- name: run tests | ||
run: dart test | ||
working-directory: dart |
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,28 @@ | ||
name: test-dotnet | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- renovate/** | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_call: | ||
|
||
jobs: | ||
test-dotnet: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '5.0.x' | ||
|
||
- run: dotnet test | ||
working-directory: dotnet | ||
|
||
- name: run acceptance tests | ||
run: make acceptance | ||
working-directory: dotnet |
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,37 @@ | ||
name: test-elixir | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- renovate/** | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_call: | ||
|
||
jobs: | ||
test-elixir: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: '22.2' | ||
elixir-version: '1.10.x' | ||
|
||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
|
||
- run: | | ||
mix local.hex --force | ||
mix deps.get | ||
working-directory: elixir | ||
- run: mix test | ||
working-directory: elixir | ||
|
||
- name: run acceptance tests | ||
run: make acceptance | ||
working-directory: elixir |
Oops, something went wrong.