Skip to content

Commit

Permalink
Simplify actions; Add gosec scan
Browse files Browse the repository at this point in the history
Signed-off-by: Dale Haiducek <[email protected]>
  • Loading branch information
dhaiducek committed Feb 16, 2024
1 parent 2cf0613 commit 326c1f0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 33 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/go-postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ on:
branches:
- main
- release-*
workflow_dispatch: {}

env:
# Common versions
GO_REQUIRED_MIN_VERSION: ''
GOPATH: '/home/runner/work/governance-policy-propagator/governance-policy-propagator/go'
defaults:
run:
working-directory: go/src/open-cluster-management.io/governance-policy-propagator

jobs:
verify:
Expand All @@ -22,13 +13,10 @@ jobs:
steps:
- name: checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/governance-policy-propagator
- name: install Go
uses: actions/setup-go@v5
with:
go-version-file: go/src/open-cluster-management.io/governance-policy-propagator/go.mod
go-version-file: go.mod
- name: images
run: make build-images
- name: push
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:

env:
TAG: ${{ github.ref_name }}
defaults:
run:
working-directory: go/src/open-cluster-management.io/governance-policy-propagator

jobs:
release:
Expand All @@ -18,13 +15,10 @@ jobs:
steps:
- name: checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/governance-policy-propagator
- name: install Go
uses: actions/setup-go@v5
with:
go-version-file: go/src/open-cluster-management.io/governance-policy-propagator/go.mod
go-version-file: go.mod
- name: build images
run: |
make build-images
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
defaults:
run:
shell: bash
working-directory: governance-policy-propagator

jobs:
unit-tests:
Expand All @@ -22,14 +21,11 @@ jobs:
steps:
- name: Checkout Governance Policy Propagator
uses: actions/checkout@v4
with:
path: governance-policy-propagator

- name: Set up Go
uses: actions/setup-go@v5
id: go
with:
go-version-file: governance-policy-propagator/go.mod
go-version-file: go.mod

- name: Verify modules
run: |
Expand All @@ -40,6 +36,7 @@ jobs:
make fmt
git diff --exit-code
make lint
make gosec-scan
- name: Verify deploy/operator.yaml
run: |
Expand All @@ -61,7 +58,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: coverage_unit
path: governance-policy-propagator/coverage_unit.out
path: coverage_unit.out

kind-tests:
runs-on: ubuntu-latest
Expand All @@ -80,8 +77,6 @@ jobs:
steps:
- name: Checkout Governance Policy Propagator
uses: actions/checkout@v4
with:
path: governance-policy-propagator

- name: Create K8s KinD Cluster - ${{ matrix.kind }}
env:
Expand All @@ -103,7 +98,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: coverage_e2e
path: governance-policy-propagator/coverage_e2e.out
path: coverage_e2e.out

- name: E2E Tests for Compliance Events API
run: |
Expand All @@ -114,7 +109,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: coverage_e2e_compliance_events_api
path: governance-policy-propagator/coverage_e2e_compliance_events_api.out
path: coverage_e2e_compliance_events_api.out

- name: Verify Deployment Configuration
run: |
Expand Down Expand Up @@ -153,8 +148,6 @@ jobs:
steps:
- name: Checkout Governance Policy Propagator
uses: actions/checkout@v4
with:
path: governance-policy-propagator

- name: Create K8s KinD Cluster - ${{ matrix.kind }}
env:
Expand All @@ -172,7 +165,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: coverage_e2e_policyautomation
path: governance-policy-propagator/coverage_e2e_policyautomation.out
path: coverage_e2e_policyautomation.out

- name: Debug
if: ${{ failure() }}
Expand Down

0 comments on commit 326c1f0

Please sign in to comment.