Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion .github/workflows/pre-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ jobs:
gh_token: ${{ secrets.SYS_ORCH_GITHUB }}
bootstrap_tools: "go,gotools,nodejs"

- name: Configure cache locations
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV

- name: Cache build artifact
uses: actions/cache@v4
with:
path: |
${{ env.GOCACHE }}
${{ env.GOMODCACHE }}
~/.cache/golangci-lint
key: ${{ github.repository }}-lint-${{ runner.os }}-go-${{ hashFiles('**/go.mod') }}

- name: Lint code
run: make lint

Expand All @@ -44,6 +58,19 @@ jobs:
gh_token: ${{ secrets.SYS_ORCH_GITHUB }}
bootstrap_tools: "go,gotools"

- name: Configure cache locations
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV

- name: Cache build artifact
uses: actions/cache@v4
with:
path: |
${{ env.GOCACHE }}
${{ env.GOMODCACHE }}
key: ${{ github.repository }}-build-${{ runner.os }}-go-${{ hashFiles('**/go.mod') }}

- name: Build code
run: make build

Expand All @@ -61,6 +88,19 @@ jobs:
gh_token: ${{ secrets.SYS_ORCH_GITHUB }}
bootstrap_tools: "go,gotools"

- name: Configure cache locations
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV

- name: Cache build artifact
uses: actions/cache@v4
with:
path: |
${{ env.GOCACHE }}
${{ env.GOMODCACHE }}
key: ${{ github.repository }}-test-${{ runner.os }}-go-${{ hashFiles('**/go.mod') }}

- name: Test code
run: make test

Expand All @@ -81,4 +121,4 @@ jobs:
run_docker_build: true
run_scan_containers: false
run_artifact: false
secrets: inherit
secrets: inherit
Loading