-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate tests from TravisCI to GitHub Action (#66)
- Loading branch information
Showing
6 changed files
with
88 additions
and
71 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,17 +1,71 @@ | ||
name: Pull request testing | ||
name: Pull request | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
GO111MODULE: on | ||
INSTALL_DEPS: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
unit-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
go-version: [1.14.x, 1.15.x] | ||
os: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- name: "Initial Action Step" | ||
run: echo "Initial Action" | ||
go-version: ${{ matrix.go-version }} | ||
- name: "Build and unit-test with Go ${{ matrix.go-version }}" | ||
run: make test-unit | ||
- name: "Hammer unit-test with ${{ matrix.go-version }}" | ||
run: make test-hammer | ||
code-quality-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
go-version: [1.14.x, 1.15.x] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: "Code Quality Analysis" | ||
run: make test-lint | ||
integration-test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
go-version: [1.14.x, 1.15.x] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Set git to use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- if: matrix.os == 'windows-latest' | ||
run: echo "BINARY_EXT=.exe" >> $GITHUB_ENV | ||
- name: "Integration testing with ${{ matrix.go-version }}" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN_INTEGRATION_TESTS }} | ||
run: | | ||
echo "${{ env.BINARY_PATH }}" | ||
make test-integration |
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
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