Merge pull request #24 from cfoust/caleb/23-08-24/go-1.23 #299
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: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.23" | |
- name: Install zsh | |
# This is used for the TestDefaultShell test | |
run: sudo apt-get install -qqy zsh | |
- name: Generate and format code | |
run: | | |
go generate ./cmd/... ./pkg/... | |
go fmt ./cmd/... ./pkg/... | |
git add . | |
git diff HEAD | |
git diff-index --quiet --cached HEAD -- | |
- name: Build | |
run: go build -v ./cmd/cy/. | |
- name: Test | |
run: go test -v ./pkg/... ./cmd/... | |
- name: Install latest mdbook | |
run: | | |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') | |
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" | |
mkdir mdbook | |
curl -sSL $url | tar -xz --directory=./mdbook | |
echo `pwd`/mdbook >> $GITHUB_PATH | |
- name: Build book | |
run: | | |
cd docs | |
# Building all of the assets for the docs site takes a while; we only | |
# build it on release. This is just to verify that this PR/commit did | |
# not break any documentation. | |
CY_SKIP_ASSETS=1 mdbook build |