Skip to content

Commit

Permalink
Adding workflow files from mass CLI, + codeowners
Browse files Browse the repository at this point in the history
  • Loading branch information
mclacore committed Oct 4, 2024
1 parent 1c5f5c1 commit 1d3a8eb
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @chrisghill
* @mclacore
26 changes: 26 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# adapted from https://github.com/golangci/golangci-lint-action
name: golangci-lint

on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.22
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.56.2
19 changes: 19 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
env:
# this check prevents devs from commit to main.
# however, we don't want it to fail on commits to main in CI.
# we use the golangci-lint gh action in lint.yaml because it generates useful comments.
SKIP: no-commit-to-branch,golangci-lint
21 changes: 21 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...

0 comments on commit 1d3a8eb

Please sign in to comment.