Skip to content

Commit

Permalink
Add test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasnde committed Mar 7, 2024
1 parent 53537f0 commit e23bdf3
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/execute_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: PR checks

permissions:
id-token: write # required to use OIDC authentication
contents: read # required to check out the code from the repo

on:
workflow_dispatch:
inputs: {}
pull_request:

jobs:
check-go:
name: Lint & execute go tests
runs-on: ubuntu-latest
strategy:
matrix:
dir: ["csvexport"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.22.x"
- name: Install dependencies
run: |
go version
go install golang.org/x/lint/golint@latest
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
only-new-issues: true
args: --issues-exit-code=0 --timeout 300s
working-directory: "./pkg/${{ matrix.dir }}"
- name: Check
run: |
go vet ./...
golint ./...
working-directory: "./pkg/${{ matrix.dir }}"
- name: Test
run: |
go test ./...
working-directory: "./pkg/${{ matrix.dir }}"

0 comments on commit e23bdf3

Please sign in to comment.