Skip to content

Commit

Permalink
ci: split off lint-unit to lint and unit
Browse files Browse the repository at this point in the history
Tools like staticcheck have problems running on the SLES container being
used to run unit tests.

Signed-off-by: Miquel Sabaté Solà <[email protected]>
  • Loading branch information
mssola committed Jun 17, 2024
1 parent b308eb3 commit ca042e7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: lint

on:
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5

- name: make lint
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
make lint
10 changes: 1 addition & 9 deletions .github/workflows/lint-unit.yml → .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: lint + unit tests
name: unit tests

# About security when running the tests and NOT exposing
# the secrets to externals. Currently Github Actions does
Expand Down Expand Up @@ -35,14 +35,6 @@ jobs:
[ -d $SOURCE ] && rm -r $SOURCE
cp -r $GITHUB_WORKSPACE $SOURCE
- name: install dependencies
run: |
cat /etc/os-release
- uses: dominikh/staticcheck-action@v1
with:
version: "latest"

- name: run unit tests
run: make test

Expand Down

0 comments on commit ca042e7

Please sign in to comment.