Skip to content

Commit

Permalink
chore: introduce .github
Browse files Browse the repository at this point in the history
  • Loading branch information
mrekucci committed Mar 29, 2024
1 parent f75f6c3 commit a0bba9e
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
52 changes: 52 additions & 0 deletions .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: mev-commit-ci

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: 1.22.1
dependencies-path: go.work.sum
id: go

- name: List Golang Workspace Modules
run: go list -f '{{.Dir}}' -m

- name: Tidy
run: go list -f '{{.Dir}}' -m | xargs -L1 go mod tidy -C

- name: Sync
run: go work sync

- name: Lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.57.2
args: --timeout 5m $(go list -f '{{.Dir}}/...' -m)

- name: Vet
run: go list -f '{{.Dir}}/...' -m | xargs go vet

- name: Build
run: go list -f '{{.Dir}}/...' -m | xargs go build

- name: Test
run: go list -f '{{.Dir}}/...' -m | xargs go test -v

0 comments on commit a0bba9e

Please sign in to comment.