Skip to content

Test

Test #374

Workflow file for this run

name: Test
on:
pull_request:
paths-ignore:
- '.github/**'
- 'docs/**'
- 'charts/**'
- 'README.md'
- 'LICENSE'
jobs:
docker-controller:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_SHA}" >> $GITHUB_ENV
- name: Set target platforms
run: echo "PLATFORMS=$(cat TARGET_PLATFORMS)" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }}
- name: Build
run: make kubeserial-docker-all
env:
DOCKERBUILD_ACTION: ""
docker-device-monitor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_SHA}" >> $GITHUB_ENV
- name: Set target platforms
run: echo "PLATFORMS=$(cat TARGET_PLATFORMS)" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }}
- name: Build
run: make device-monitor-docker-all
env:
DOCKERBUILD_ACTION: ""
docker-injector-webhook:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_SHA}" >> $GITHUB_ENV
- name: Set target platforms
run: echo "PLATFORMS=$(cat TARGET_PLATFORMS)" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_CONTAINER_REGISTRY_TOKEN }}
- name: Build
run: make injector-webhook-docker-all
env:
DOCKERBUILD_ACTION: ""
codegen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.22
- name: debug paths and dirs
run: |
ls -la .
pwd
ls -la pkg/generated/ || echo "NO DIR"
- name: Check codegen
run: make check-generated
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.22
- name: Test
run: make test
- name: Upload coverage
uses: codecov/codecov-action@v1