From 4580badff2910b193df4c96c1448c664915b9256 Mon Sep 17 00:00:00 2001 From: Mostafa Moradian Date: Sat, 6 Apr 2024 22:50:59 +0200 Subject: [PATCH] Add test workflow with linting --- .github/workflows/test.yaml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..1762a0b --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,47 @@ +name: Test gatewayd-plugin-sql-ids-ips + +on: + push: + branches: + - main + tags: + - v* + paths-ignore: + - "README.md" + - "LICENSE" + - "CONTRIBUTING.md" + - "CODE_OF_CONDUCT.md" + - ".gitignore" + - ".gitattributes" + pull_request: + paths-ignore: + - "README.md" + - "LICENSE" + - "CONTRIBUTING.md" + - "CODE_OF_CONDUCT.md" + - ".gitignore" + - ".gitattributes" + +jobs: + test: + name: Test gatewayd-plugin-sql-ids-ips + runs-on: ubuntu-latest + # Timeout after 5 minutes, to avoid hanging tests + timeout-minutes: 5 + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install Go 🧑‍💻 + uses: actions/setup-go@v5 + with: + go-version: "1.22" + + - name: Lint code issues 🚨 + uses: golangci/golangci-lint-action@v4 + with: + version: "v1.57" + skip-pkg-cache: true + install-mode: "goinstall"