simplify middleware api #37
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
name: 'Test' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ 'ubuntu-latest', 'macos-latest' ] | |
go: [ '1.17', '1.18', '1.19', '1.20' ] | |
node: [ '16' ] | |
include: | |
- os: ubuntu-latest | |
go: '1.18' | |
node: 18 | |
- os: macos-latest | |
go: '1.18' | |
node: 18 | |
- os: macos-latest | |
go: '1.19' | |
node: 18 | |
- os: macos-latest | |
go: '1.20' | |
node: 18 | |
steps: | |
- name: Check out bud | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
id: go | |
with: | |
go-version: ${{ matrix.go }} | |
cache: true | |
cache-dependency-path: go.sum | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'npm' | |
cache-dependency-path: | | |
livebud/package-lock.json | |
package-lock.json | |
- name: Install bud node_modules | |
run: npm ci | |
- name: Install livebud node_modules | |
run: npm ci | |
working-directory: ./livebud | |
- name: Install Go modules | |
run: go mod download | |
- name: Cached testdir snapshots | |
uses: actions/cache@v3 | |
with: | |
path: $TMPDIR/bud/snapshot | |
key: ${{ runner.os }} | |
- name: Run Go Format on Go 1.19 | |
if: matrix.go == '1.19' | |
run: make go.fmt | |
- name: Run CI (Ubuntu Linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: make ci.ubuntu | |
- name: Run CI (macOS) | |
if: matrix.os == 'macos-latest' | |
run: make ci.macos | |
staticcheck: | |
name: 'Run staticcheck' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ 'ubuntu-latest', 'macOS-latest' ] | |
go: [ '1.17', '1.18', '1.19', '1.20' ] | |
dir: [ 'internal', 'package', 'framework' ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- uses: WillAbides/setup-go-faster@v1.8.0 | |
with: | |
go-version: ${{ matrix.go }} | |
- uses: dominikh/staticcheck-action@v1.3.0 | |
if: contains(fromJSON('["1.19", "1.20"]'), matrix.go) | |
with: | |
version: '2023.1' | |
install-go: false | |
min-go-version: ${{ matrix.go }} | |
cache-key: ${{ matrix.go }} | |
working-directory: ${{ matrix.dir }} | |
- uses: dominikh/staticcheck-action@v1.3.0 | |
if: contains(fromJSON('["1.17", "1.18"]'), matrix.go) | |
with: | |
version: '2022.1' | |
install-go: false | |
min-go-version: ${{ matrix.go }} | |
cache-key: ${{ matrix.go }} | |
working-directory: ${{ matrix.dir }} |