-
Notifications
You must be signed in to change notification settings - Fork 312
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
1 parent
846d69e
commit f15fdbd
Showing
4 changed files
with
122 additions
and
98 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: E2E tests | ||
on: | ||
workflow_run: | ||
workflows: [Unit tests and linters] | ||
types: [completed] | ||
|
||
jobs: | ||
e2e-tests: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
environment: production | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21.x' | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: E2E basic test | ||
run: go run mage.go -v TestE2EBasic | ||
|
||
- name: E2E NAT test | ||
run: go run mage.go -v TestE2ENAT |
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,53 @@ | ||
name: Build and Release | ||
on: | ||
workflow_run: | ||
workflows: [E2E tests] | ||
types: [completed] | ||
branches: [master, ci-migration] | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
RELEASE_BUILD: false | ||
SNAPSHOT_BUILD: false | ||
BUILD_VERSION: ${{ github.sha }} | ||
|
||
jobs: | ||
build-packages: | ||
if: | | ||
${{ github.event.workflow_run.conclusion == 'success' }} || | ||
${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }} | ||
runs-on: ubuntu-latest | ||
environment: production | ||
|
||
strategy: | ||
max-parallel: 3 | ||
matrix: | ||
platform: | ||
- PackageLinuxAmd64 | ||
- PackageLinuxArm | ||
- PackageLinuxDebianAmd64 | ||
- PackageLinuxDebianArm64 | ||
- PackageLinuxDebianArm | ||
- PackageLinuxRaspberryImage | ||
- PackageMacOSAmd64 | ||
- PackageMacOSArm64 | ||
- PackageWindowsAmd64 | ||
- PackageAndroid | ||
- PackageAndroidProvider | ||
- PackageDockerSwaggerRedoc | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21.x' | ||
- name: Setup FPM | ||
run: | | ||
sudo apt-get install ruby-dev build-essential | ||
sudo gem i fpm -f | ||
- name: Build package | ||
run: go run mage.go -v ${{ matrix.platform }} |
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,39 @@ | ||
name: Unit tests and linters | ||
on: | ||
pull_request: | ||
# for debug purposes only | ||
push: | ||
branches: [ci-migration] | ||
|
||
env: | ||
GOFLAGS: "-count=1" | ||
|
||
jobs: | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
environment: production | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21.x' | ||
|
||
- name: Install protoc | ||
run: sudo apt install -y protobuf-compiler | ||
|
||
- name: Unit tests and linters | ||
run: | | ||
go run mage.go -v Generate | ||
go run mage.go -v Check | ||
go run mage.go -v TestWithCoverage | ||
- name: Upload codecov report | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
file: ./coverage.txt | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
|
||
|