Skip to content

Commit

Permalink
Migrate the master branch to GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpromislow committed Apr 29, 2024
1 parent ca48492 commit cfa2c47
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 58 deletions.
37 changes: 0 additions & 37 deletions .drone.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: ci

on:
push:
pull_request:
tags:
- v*
branches:
- 'release/*'
- 'master'

jobs:
ci:
strategy:
matrix:
arch : [ amd64,arm64 ]
runs-on : ["org--${{ github.repository_owner }}--${{ matrix.arch }}-containers"]
container: ghcr.io/catthehacker/ubuntu:act-22.04
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 : Run CI
run: bash scripts/ci

42 changes: 21 additions & 21 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
name: golangci-lint

env:
SETUP_GO_VERSION: '^1.20'
name: golint

on:
push:
Expand All @@ -14,25 +11,28 @@ on:

jobs:
golangci:
name: golangci-lint
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Checkout
# https://github.com/actions/checkout/releases/tag/v4.1.1
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.SETUP_GO_VERSION }}
- name: Set up 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: Generate Golang
run: |
export PATH=$PATH:/home/runner/go/bin/
- name: Generate Golang
run: |
export PATH=$PATH:/home/runner/go/bin/
- name: golangci-lint
uses: golangci/golangci-lint-action@v4.0.0
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.55
- name: Run golangci-lint
# https://github.com/golangci/golangci-lint-action/tree/v5.1.0
uses: golangci/golangci-lint-action@9d1e0624a798bb64f6c3cea93db47765312263dc # v5.1.0
with:
# The version of golangci-lint to use.
version: latest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/dist
/build
*.swp
*~
/.trash-cache
/trash.lock
/.idea
Expand Down

0 comments on commit cfa2c47

Please sign in to comment.