Skip to content

ci #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2024
Merged

ci #1

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "build"

on:
push: # We run tests on non-tagged pushes to main
tags: ''
branches: main
paths-ignore:
- '**/*.md'
pull_request: # We also run tests on pull requests targeted at the main branch.
branches: main
paths-ignore:
- '**/*.md'
# workflow_dispatch will let us manually trigger the workflow from GitHub actions dashboard.
# For example, you can try to build a branch without raising a pull request.
# See https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-22.04
strategy:
matrix:
go-version:
- "1.22"
steps:
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v2
- run: make lint

test:
runs-on: ubuntu-22.04
strategy:
matrix:
go-version:
- "1.22"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- run: make test
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.PHONY: lint
lint:
golangci-lint run ./...

.PHONY: format
fmt:
go fmt ./...

.PHONY: test
test:
go test -v ./...
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module golangchain

go 1.22.4
5 changes: 5 additions & 0 deletions pkg/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package main

func main() {
println("aaa")
}
Loading