Skip to content

Commit

Permalink
Add first pre commits and push checks
Browse files Browse the repository at this point in the history
  • Loading branch information
noahshinn committed Dec 6, 2023
1 parent c9c51f2 commit 28b3c52
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/go-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: go-tests

on:
pull_request:
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"

- name: Build
run: go build -v ./...
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- repo: local
hooks:
- id: gofmt
name: format go code
description: Runs `gofmt` on Go files
language: system
entry: gofmt -l -w
types: [go]
default_stages: [commit]
default_install_hook_types: [pre-commit, commit-msg]

0 comments on commit 28b3c52

Please sign in to comment.