Skip to content

Commit

Permalink
Add lint job to CI (#101)
Browse files Browse the repository at this point in the history
Signed-off-by: Ondrej Vasko <[email protected]>
  • Loading branch information
Lirt authored Aug 3, 2023
1 parent c9b5ee5 commit ff31988
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,34 @@
name: Integration tests with Kind and DevStack
on: [pull_request]
jobs:
lint:
name: "Linters (go v${{ matrix.go-version }})"
runs-on: ubuntu-20.04
strategy:
matrix:
go-version: [ '1.20' ]
steps:
- name: Checkout velero-plugin-for-openstack
uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Check formatting
run: |
test -z $(gofmt -l -s ./)
- name: Check go vet
run: |
go vet ./...
- name: Verify dependencies
run: |
go mod verify
- name: Check if plugin can be built
run: |
go build -v .
unit-test:
name: "Unit tests (go v${{ matrix.go-version }})"
needs: lint
runs-on: ubuntu-20.04
strategy:
matrix:
Expand Down

0 comments on commit ff31988

Please sign in to comment.