Skip to content

Add Github Actions for each project #1

Add Github Actions for each project

Add Github Actions for each project #1

name: go-fiber-langchaingo CI
on:
push:
paths:
- 'go-fiber-langchaingo/**'
- '.github/workflows/go-fiber-langchaingo.yml'
pull_request:
paths:
- 'go-fiber-langchaingo/**'
- '.github/workflows/go-fiber-langchaingo.yml'
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: go-fiber-langchaingo
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go-fiber-langchaingo/go.mod'
cache: true
- name: Build
run: make build || go build -o ./bin/app ./cmd/server
- name: Test
run: go test ./... -v
- name: Upload artifacts
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: go-fiber-langchaingo-artifacts
path: go-fiber-langchaingo/bin