-
Notifications
You must be signed in to change notification settings - Fork 109
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
9058614
commit a9c05b3
Showing
2 changed files
with
68 additions
and
30 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,38 @@ | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 | ||
- name: Lint | ||
run: make lint | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 | ||
- name: Test | ||
run: make test | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
needs: [lint,test] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 | ||
- name: Build | ||
run: make build | ||
- name: Make Clean | ||
run: make clean |
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,37 +1,37 @@ | ||
name: Test | ||
# name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
# on: | ||
# push: | ||
# branches: | ||
# - master | ||
# pull_request: | ||
|
||
permissions: | ||
contents: read | ||
checks: write | ||
pull-requests: write | ||
# permissions: | ||
# contents: read | ||
# checks: write | ||
# pull-requests: write | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
# jobs: | ||
# test: | ||
# runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.20.7 | ||
# - name: Install Go | ||
# uses: actions/setup-go@v4 | ||
# with: | ||
# go-version: 1.20.7 | ||
|
||
- name: Run tests | ||
run: | | ||
go install gotest.tools/gotestsum@latest | ||
mkdir -p test-reports | ||
gotestsum --junitfile test-reports/unit-tests.xml | ||
# - name: Run tests | ||
# run: | | ||
# go install gotest.tools/gotestsum@latest | ||
# mkdir -p test-reports | ||
# gotestsum --junitfile test-reports/unit-tests.xml | ||
|
||
- name: Publish Unit Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v1 | ||
if: always() | ||
with: | ||
files: test-reports/unit-tests.xml | ||
# - name: Publish Unit Test Results | ||
# uses: EnricoMi/publish-unit-test-result-action@v1 | ||
# if: always() | ||
# with: | ||
# files: test-reports/unit-tests.xml |