Skip to content

Commit

Permalink
feat:testing in ci (#223)
Browse files Browse the repository at this point in the history
* added testing which is run in CI before building the docker file

* fixed `build` not depending on `test`

* fixed the setup-go not using a cached path leading to excessive download times
  • Loading branch information
CommanderStorm authored Sep 14, 2023
1 parent facf354 commit 193ac02
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: CI
name: lint
on:
push:
branches: [ main ]
pull_request:

permissions:
contents: read

jobs:
ci:
lint:
name: lint
runs-on: ubuntu-latest
steps:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,21 @@ on:
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache-dependency-path: |
server/go.sum
- name: run tests
run: go test -v ./...
working-directory: ./server
build:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down

0 comments on commit 193ac02

Please sign in to comment.