Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(ci): use meta build workflow #1123

Merged
merged 1 commit into from
Aug 29, 2024
Merged
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
59 changes: 14 additions & 45 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,17 @@ on: [push, pull_request]

jobs:
build:
strategy:
matrix:
go-version: [~1.18, ^1]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
GO111MODULE: "on"
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v4

- name: Download Go modules
run: go mod download

- name: Build
run: |
go mod tidy
go build -v ./...

- name: Test
run: go test ./...

- name: Build examples
if: ${{ matrix.go-version != '~1.18' }}
run: |
go mod tidy
go build -v ./...
working-directory: ./examples

- name: Test examples
if: ${{ matrix.go-version != '~1.18' }}
run: go test -v ./...
working-directory: ./examples

- name: Build tutorials
if: ${{ matrix.go-version != '~1.18' }}
run: |
go mod tidy
go build -v ./...
working-directory: ./tutorials
uses: charmbracelet/meta/.github/workflows/build.yml@main

build-go-mod:
uses: charmbracelet/meta/.github/workflows/build.yml@main
with:
go-version: ""
go-version-file: ./go.mod

build-examples:
uses: charmbracelet/meta/.github/workflows/build.yml@main
with:
go-version: ""
go-version-file: ./examples/go.mod
working-directory: ./examples
Loading