Skip to content

Commit

Permalink
feat: adding unit tests for ipsec
Browse files Browse the repository at this point in the history
feat: adding unit tests for ipsec

Signed-off-by: mohamedasifs123 <[email protected]>

feat: adding unit tests for ipsec

Signed-off-by: mohamedasifs123 <[email protected]>

Update go.yml

feat: adding unit tests for ipsec

Signed-off-by: mohamedasifs123 <[email protected]>
  • Loading branch information
mohamedasifs123 committed Jan 17, 2025
1 parent 66cd2ff commit 2614cfd
Show file tree
Hide file tree
Showing 19 changed files with 1,383 additions and 3 deletions.
52 changes: 49 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,52 @@ on:
branches: [ "main" ]

jobs:
call:
uses: opiproject/actions/.github/workflows/go.yml@main
secrets: inherit
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [ '1.21', '1.22' ]

steps:
- uses: actions/checkout@v4

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 0: GitHub-owned GitHubAction not pinned by hash
Click Remediation section below to solve this issue

- name: Set up Go
uses: actions/setup-go@v5

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 0: GitHub-owned GitHubAction not pinned by hash
Click Remediation section below to solve this issue
with:
go-version: ${{ matrix.go-version }}

- name: Build
run: go build -v ./...
working-directory: cmd

test:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

Check failure

Code scanning / Scorecard

Token-Permissions High

score is 0: jobLevel 'packages' permission set to 'write'
Remediation tip: Verify which permissions are needed and consider whether you can reduce them.
Click Remediation section below for further remediation help

steps:
- name: Checkout repository
uses: actions/checkout@v4

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 0: GitHub-owned GitHubAction not pinned by hash
Click Remediation section below to solve this issue

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 0: third-party GitHubAction not pinned by hash
Click Remediation section below to solve this issue

- name: Build & Start containers
run: |
set -x
cd tests
docker compose up --build --force-recreate --detach
docker exec -i tests-go-test-1 go test -race -coverprofile=coverage.out -covermode=atomic -v ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 0: third-party GitHubAction not pinned by hash
Click Remediation section below to solve this issue

- name: Logs
if: always()
run: docker compose logs

- name: Stop containers
if: always()
run: docker compose down --volumes --remove-orphans
Loading

0 comments on commit 2614cfd

Please sign in to comment.