Skip to content

Auto env vars + Ignore Failures mode + end2end test #25

Auto env vars + Ignore Failures mode + end2end test

Auto env vars + Ignore Failures mode + end2end test #25

Workflow file for this run

name: CI
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
services:
bazel-remote:
image: buchgr/bazel-remote-cache:v1.3.4
ports:
- 9092:9092
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build CLI
run: mkdir -p bin && go build -o bin/tbc .
- name: Upload CLI
uses: actions/upload-artifact@v4
with:
name: tbc
path: bin/tbc
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59.1
- name: Run tests
run: go test ./...
- name: Run integration tests
run: go test ./client -remote-cache-host localhost:9092
end2end:
runs-on: ubuntu-latest
needs: build
services:
bazel-remote:
image: buchgr/bazel-remote-cache:v1.3.4
ports:
- 9092:9092
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
sparse-checkout: |
.github
end2end
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
package_json_file: end2end/monorepo/package.json
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: end2end/.tool-versions
cache: 'pnpm'
cache-dependency-path: end2end/monorepo/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install
- name: Grab tbc CLI
uses: actions/download-artifact@v4
with:
name: tbc