From 7dc1b6019bcd183fb1b326e72b82e9800ea41ecb Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Thu, 29 Aug 2024 12:11:57 -0400 Subject: [PATCH] feat(ci): use meta build workflow Use charmbracelet/meta build workflow to build and test bubbletea and its examples. --- .github/workflows/build.yml | 59 +++++++++---------------------------- 1 file changed, 14 insertions(+), 45 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f82f8c43a..189c3915df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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