Enum string API #358
Workflow file for this run
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
name: PR | |
on: | |
workflow_dispatch: {} | |
pull_request: | |
branches: | |
- main | |
workflow_call: | |
jobs: | |
analyze-code: | |
name: Analyze Code | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
uses: ./.github/actions/build-dependencies | |
- name: Lint | |
run: | | |
if test -z "$(gofmt -l .)"; then | |
echo "Congrats! There is nothing to fix." | |
else | |
echo "The following lines should be fixed." | |
gofmt -s -d . | |
exit 1 | |
fi | |
shell: bash | |
# - name: Install staticchecker | |
# run: | | |
# go install honnef.co/go/tools/cmd/staticcheck@latest | |
# cp $HOME/go/bin/staticcheck /usr/bin/ | |
# shell: bash | |
- name: Install revive | |
run: | | |
go install github.com/mgechev/revive@latest | |
sudo cp $HOME/go/bin/revive /usr/bin/ | |
shell: bash | |
# - name: Install goimports-reviser | |
# run: | | |
# go go install github.com/incu6us/goimports-reviser/v3@latest | |
# sudo cp $HOME/go/bin/goimports-reviser /usr/bin/ | |
# shell: bash | |
# - name: Install errcheck | |
# run: | | |
# go install github.com/kisielk/errcheck@latest | |
# sudo cp $HOME/go/bin/errcheck /usr/bin/ | |
# shell: bash | |
- name: Check Code Style | |
run: | | |
make fmt-check | |
shell: bash | |
- name: Lint (Revive) | |
run: | | |
make lint-check | |
shell: bash | |
libbpfgo-unit-tests: | |
name: libbpfgo Unit Tests | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
go-version: [ 1.18, 1.19, '1.20', 'stable' ] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
uses: ./.github/actions/build-dependencies | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Test libbpfgo | |
run: | | |
make libbpfgo-static-test | |
helpers-unit-tests: | |
name: Helpers Unit Tests | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
go-version: [ 1.18, 1.19, '1.20', 'stable' ] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
uses: ./.github/actions/build-dependencies | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Test Helpers | |
run: | | |
make helpers-test-static-run | |
self-tests: | |
name: Selftests | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
go-version: [ 1.18, 1.19, '1.20', 'stable' ] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
uses: ./.github/actions/build-dependencies | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Static Selftests | |
run: | | |
make selftest-static-run |