Skip to content

Commit

Permalink
github action setup
Browse files Browse the repository at this point in the history
testing, lint, auto branch delete
  • Loading branch information
notJoon committed May 3, 2024
1 parent dc4902c commit cebd4ec
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Go Workflow

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

jobs:
test-and-lint:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.22.2"

- name: Run tests
run: go test ./...

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest

cleanup:
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Delete merged branch
uses: dawidd6/action-delete-branch@v3
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/gnoswap-labs/vwap

go 1.22.2

0 comments on commit cebd4ec

Please sign in to comment.