Update all Go dependencies except Kubernetes #128
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Test | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 3 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.63.4 | |
args: --timeout=5m | |
skip-cache: true | |
- name: Run tests | |
run: make all | |
- name: Run coverage | |
run: make coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.txt | |
build: | |
runs-on: ubuntu-latest | |
name: Build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build | |
run: make build | |
- name: Run GoReleaser build | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: latest | |
args: build --snapshot --clean | |
- name: Docker Build | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: false | |
tags: quay.io/ohiosupercomputercenter/job-pod-reaper:latest | |
outputs: type=docker,dest=/tmp/job-pod-reaper.tar | |
- name: Upload Docker image | |
uses: actions/upload-artifact@v4 | |
with: | |
name: image | |
path: /tmp/job-pod-reaper.tar | |
test-helm: | |
needs: [build] | |
runs-on: ubuntu-latest | |
name: Test Helm Chart | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/[email protected] | |
with: | |
version: v3.8.0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
- name: Download image | |
uses: actions/download-artifact@v4 | |
with: | |
name: image | |
path: /tmp | |
- name: Run chart-testing (lint) | |
run: ct lint --target-branch=main --check-version-increment=false | |
- name: Create kind cluster | |
uses: helm/[email protected] | |
with: | |
version: v0.26.0 | |
node_image: kindest/node:v1.29.12@sha256:62c0672ba99a4afd7396512848d6fc382906b8f33349ae68fb1dbfe549f70dec | |
cluster_name: kind | |
- name: Load image | |
run: | | |
docker load --input /tmp/job-pod-reaper.tar | |
kind load docker-image quay.io/ohiosupercomputercenter/job-pod-reaper:latest | |
- name: Update chart values | |
run: | | |
sed -i \ | |
-e 's|tag:.*|tag: latest|g' \ | |
charts/job-pod-reaper/values.yaml | |
cat charts/job-pod-reaper/values.yaml | |
- name: Run chart-testing (install) | |
run: ct install --target-branch=main |