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 9627f01
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 63 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

51 changes: 25 additions & 26 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
name: golangci-lint
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

env:
SETUP_GO_VERSION: '^1.20'
name: golint2

on:
push:
branches: [ "master" ]
pull_request:
tags:
- v*
branches:
- 'release/*'
- 'master'
branches: [ "master", "release/*" ]
tags: ["v*"]

jobs:
golangci:
name: golangci-lint
golangci2:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.SETUP_GO_VERSION }}
- name: Set up Go
uses: actions/setup-go@v4
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
uses: golangci/golangci-lint-action@v5.1.0
with:
# The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
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 9627f01

Please sign in to comment.