Skip to content

[Utils] Implement helpers to remove dependencies #5

[Utils] Implement helpers to remove dependencies

[Utils] Implement helpers to remove dependencies #5

Workflow file for this run

# Copyright 2025 The Nuclio Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.23', '1.24']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Set up GOPATH
run: |
echo "GOPATH=${{ github.workspace }}/go" >> $GITHUB_ENV
echo "${{ github.workspace }}/go/bin" >> $GITHUB_PATH
- name: Download dependencies
run: make modules
- name: Verify dependencies
run: go mod verify
- name: Run tests with coverage
run: make test-coverage
- name: Lint
run: make lint
- name: Upload coverage reports
uses: actions/upload-artifact@v4
with:
name: coverage-reports-go-${{ matrix.go-version }}
path: |
coverage.out
coverage.html
retention-days: 30
- name: Display coverage summary
run: |
echo "## Coverage Summary" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
go tool cover -func=coverage.out >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
security:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Run security scan with go vet
run: |
go vet ./...