Update Pants version. #198
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 | |
# Trigger this workflow on any push (to main) or pull request. | |
on: | |
workflow_call: | |
secrets: | |
TOOLCHAIN_AUTH_TOKEN: | |
required: true | |
push: | |
branches: | |
- main | |
pull_request: {} | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.19' | |
- name: Initialize Pants | |
uses: pantsbuild/actions/init-pants@v8 | |
with: | |
# cache0 makes it easy to bust the cache if needed | |
gha-cache-key: cache0- | |
named-caches-hash: ${{ hashFiles('go.mod') }} | |
- name: Set env vars | |
run: | | |
echo 'PANTS_CONFIG_FILES=+["${{ github.workspace }}/pants.ci.toml"]' >> ${GITHUB_ENV} | |
- name: Pants Bootstrap | |
run: pants version | |
- name: show toolchain token | |
if: github.event_name == 'push' | |
run: pants auth-token-info --auth-token-info-verbose | |
- name: Lint & check | |
run: | | |
pants lint check :: | |
- name: Tests | |
run: | | |
pants test :: | |
- name: Build smoketest & casloader docker images | |
run: | | |
pants package cmd/:: | |
# Keeping those here since the publish workflow wasn't ported to use pants. | |
- name: Build smoketest docker image | |
uses: docker/build-push-action@v3 | |
with: | |
tags: smoketest:ci | |
build-args: APP_NAME=smoketest | |
- name: Build casload docker image | |
uses: docker/build-push-action@v3 | |
with: | |
tags: casload:ci | |
build-args: APP_NAME=casload |