Skip to content

Explore adding native windows and linux driver #178

Explore adding native windows and linux driver

Explore adding native windows and linux driver #178

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
CodeQL:
name: CodeQL validation
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: go
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
OpenAPI:
runs-on: ubuntu-latest
name: OpenAPI validation
# Service containers to run with `runner-job`
services:
# Label used to access the service container
swagger-editor:
# Docker Hub image
image: swaggerapi/swagger-editor
ports:
# Maps port 8080 on service container to the host 80
- 80:8080
steps:
- uses: actions/checkout@v4
- name: Validate OpenAPI definition
uses: swaggerexpert/swagger-editor-validate@452076dc45d5d1f09dd55440c9bffc372de4da25 # Jul 29, 2024
with:
swagger-editor-url: http://localhost/
definition-file: docs/openapi.yaml
GolangCI:
runs-on: ubuntu-latest
name: Code Lint
permissions:
# Required: allow read access to the content for analysis.
contents: read
# Optional: allow write access to checks to allow the action to annotate code in the PR.
checks: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable # Linter will use go.mod file to adjust the rules properly
- name: Generate code
run: ONLYGEN=1 ./build.sh
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # To get all the tags for versioning
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: RELEASE=1 ./build.sh
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: binaries
path: aquarium-fish*.tar.xz
- name: Benchmarks main
run: go run go.bobheadxi.dev/gobenchdata@v1 action
if: github.ref == 'refs/heads/main'
env:
INPUT_PUBLISH: true
INPUT_CHECKS: true
INPUT_PRUNE_COUNT: 30
INPUT_GO_TEST_FLAGS: "-run=^# -cpu 1,2 -benchmem"
INPUT_CHECKS_CONFIG: gobenchdata-checks.yml
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- name: Benchmarks PR
run: go run go.bobheadxi.dev/gobenchdata@v1 action
if: github.ref != 'refs/heads/main'
env:
INPUT_PUBLISH: false
INPUT_CHECKS: true
INPUT_PRUNE_COUNT: 30
INPUT_GO_TEST_FLAGS: "-run=^# -cpu 1,2 -benchmem"
INPUT_CHECKS_CONFIG: gobenchdata-checks.yml
- name: Integration Tests
run: |
go install github.com/jstemmer/go-junit-report/v2@85bf471 # Oct 18, 2023
name="$(ls aquarium-fish-*.linux_amd64)"
FISH_PATH="$PWD/$name" go test -v -failfast -parallel 4 -count=1 ./tests/... 2>&1 | go-junit-report -iocopy -set-exit-code -out report.xml
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: tests
path: '/tmp/gobenchdata/*'
- name: Test Summary
uses: test-summary/action@v2
if: always()
with:
paths: report.xml