Skip to content

Commit

Permalink
feat(ci): use meta build workflow (#1123)
Browse files Browse the repository at this point in the history
Use charmbracelet/meta build workflow to build and test bubbletea and
its examples.
  • Loading branch information
aymanbagabas authored Aug 29, 2024
1 parent c69bd97 commit a5437ac
Showing 1 changed file with 14 additions and 45 deletions.
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

0 comments on commit a5437ac

Please # to comment.