1
0
mirror of https://github.com/rancher/steve.git synced 2025-04-27 11:00:48 +00:00

Merge pull request #218 from nflynt/drone2gha

Migrate from Drone to GHA
This commit is contained in:
nflynt 2024-05-28 14:29:26 -04:00 committed by GitHub
commit 4cf4e6b385
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 33 additions and 59 deletions

View File

@ -1,59 +0,0 @@
---
kind: pipeline
name: fossa
steps:
- name: fossa
image: rancher/drone-fossa:latest
settings:
api_key:
from_secret: FOSSA_API_KEY
when:
instance:
include:
- drone-publish.rancher.io
exclude:
- drone-pr.rancher.io
---
kind: pipeline
name: build
steps:
- name: build
image: registry.suse.com/bci/golang:1.22
commands:
- make build-bin
when:
event:
- push
- pull_request
---
kind: pipeline
name: validate
steps:
- name: validate
image: registry.suse.com/bci/bci-base:15.6
commands:
- zypper in -y "golang(API)=1.22" git tar gzip make
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.57.1
- mv ./bin/golangci-lint /usr/local/bin/golangci-lint
- GOBIN=/usr/local/bin go install github.com/golang/mock/mockgen@v1.6.0
- make validate
when:
event:
- push
- pull_request
---
kind: pipeline
name: test
steps:
- name: test
image: registry.suse.com/bci/golang:1.22
commands:
- make test
when:
event:
- push
- pull_request

33
.github/workflows/ci.yaml vendored Normal file
View File

@ -0,0 +1,33 @@
name: CI
on:
pull_request: {}
push:
branches:
- master
- release/*
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name : Checkout repository
# https://github.com/actions/checkout/releases/tag/v4.1.1
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Go
# https://github.com/actions/setup-go/releases/tag/v5.0.0
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
- name: Install mockgen
run: go install github.com/golang/mock/mockgen@v1.6.0
- name: Install golangci-lint
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
with:
version: v1.57.1
- name: Build
run: make build-bin
- name: Test
run: make test
- name: Validate
run: make validate