Skip to content

Commit

Permalink
Updated test workflow and added lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xBlaz3kx committed Jul 31, 2024
1 parent 470143e commit af2d499
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 16 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Lint
on:
push:
branches:
- main
paths-ignore:
- '.run/**'
- '.vscode/**'
- 'documentation/**'

pull_request:
types: [ opened, synchronize ]
paths-ignore:
- '.run/**'
- '.vscode/**'
- 'documentation/**'
branches:
- main

workflow_dispatch:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: 1.20

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
args: --timeout=3m
28 changes: 12 additions & 16 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,31 @@
name: "Testing"

name: "Tests"
on:
push:
pull_request:
types: [ opened, synchronize ]
branches:
- main
paths-ignore:
- 'docs/**'
- '.run/**'
- '.vscode/**'
- 'documentation/**'
- '*.md'
- 'docker-compose.yaml'
- 'docker-compose.dev.yaml'
- 'makefile'
pull_request:
types: [ opened,synchronize ]
branches:
- main
workflow_dispatch:

jobs:
test:
name: Run Go Unit Tests
# Run unit tests
tests:
name: "Run unit tests"
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.20

- name: Get dependencies and run tests
- name: Install dependencies and run tests
run: |
go mod download
go test -v ./...

0 comments on commit af2d499

Please sign in to comment.