diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fe5eb099..49fe018f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,11 +1,7 @@ name: Server CI on: # yamllint disable-line rule:truthy - pull_request: - paths: - - "server/**" - - "hack/tools/**" - - ".github/**" + pull_request: {} push: branches: [main] @@ -17,6 +13,11 @@ jobs: unit: name: Unit tests runs-on: ubuntu-22.04 + strategy: + matrix: + include: + - directory: server + - directory: operator steps: - name: Set up Go @@ -29,7 +30,7 @@ jobs: - name: Run tests # todo: set up code coverage? - run: make -C server test + run: make -C "${{ matrix.directory }}" test lint-go: name: Lint code @@ -47,7 +48,7 @@ jobs: - name: Determine golang-ci version id: golangci_version run: | - echo "version=$(go mod edit -json | jq '.Require | map(select(.Path == "github.com/golangci/golangci-lint"))[].Version')" >> $GITHUB_OUTPUT + echo "version=$(go mod edit -json hack/tools/golang-ci/go.mod | jq '.Require | map(select(.Path == "github.com/golangci/golangci-lint"))[].Version')" >> $GITHUB_OUTPUT - name: Lint with golang-ci uses: golangci/golangci-lint-action@v6