more colima fiddlin #1082
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: hof | |
"on": | |
- push | |
env: | |
HOF_TELEMETRY_DISABLED: "1" | |
jobs: | |
test: | |
concurrency: | |
group: ${{ github.workflow }}-${{ matrix.os }}-${{ matrix.go }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
strategy: | |
fail-fast: false | |
matrix: | |
go: | |
- 1.20.x | |
- 1.21.x | |
os: | |
- ubuntu-latest | |
- macos-latest | |
environment: hof mod testing | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- uses: actions/cache@v3 | |
with: | |
path: |- | |
~/go/pkg/mod | |
~/.cache/go-build | |
~/Library/Caches/go-build | |
~\AppData\Local\go-build | |
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-go-${{ matrix.go-version }}- | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Vars | |
id: vars | |
run: |- | |
SHA=${GITHUB_SHA::8} | |
TAG=$(git tag --points-at HEAD) | |
echo "HOF_FMT_VERSION=${TAG}" >> $GITHUB_ENV | |
if [ -z $TAG ]; then | |
TAG=${SHA} | |
fi | |
echo "HOF_SHA=${SHA}" >> $GITHUB_ENV | |
echo "HOF_TAG=${TAG}" >> $GITHUB_ENV | |
- name: Setup Docker on MacOS | |
run: |- | |
brew list | |
brew reinstall -f --force-bottle qemu lima colima docker | |
limactl info | |
colima stop --force | |
colima delete | |
colima start debug --cpu 3 --memory 10 --disk 12 | |
colima status | |
if: ${{ startsWith( runner.os, 'macos') }} | |
- name: Setup MacOS docker socket | |
run: echo "DOCKER_HOST="unix://$HOME/.colima/default/docker.sock"" >> $GITHUB_ENV | |
if: ${{ startsWith( runner.os, 'macos') }} | |
- name: Test Compatibility | |
run: |- | |
docker version | |
docker info | |
docker context ls | |
go run test/docker/main.go | |
- name: Fetch Go deps | |
run: go mod download | |
- name: Build CLI | |
run: go install ./cmd/hof | |
- name: Build Formatters | |
run: |- | |
make formatters | |
docker images | |
hof fmt start | |
hof fmt info | |
docker ps -a | |
- name: test/self | |
env: | |
GITHUB_TOKEN: ${{secrets.HOFMOD_TOKEN}} | |
run: |- | |
# self: gen -> diff | |
set -e | |
# mods & deps | |
hof mod tidy | |
hof fmt cue.mod/module.cue | |
hof mod vendor | |
# gen self | |
hof gen | |
# should have no diff | |
git diff --exit-code | |
- name: test/gen | |
env: | |
GITHUB_TOKEN: ${{secrets.HOFMOD_TOKEN}} | |
run: hof flow @test/gen ./test.cue | |
- name: test/create | |
env: | |
GITHUB_TOKEN: ${{secrets.HOFMOD_TOKEN}} | |
run: hof flow @test/create ./test.cue | |
- name: test/structural | |
env: | |
GITHUB_TOKEN: ${{secrets.HOFMOD_TOKEN}} | |
run: hof flow @test/st ./test.cue | |
- name: test/datamodel | |
env: | |
GITHUB_TOKEN: ${{secrets.HOFMOD_TOKEN}} | |
run: hof flow @test/dm ./test.cue | |
- name: test/flow | |
env: | |
GITHUB_TOKEN: ${{secrets.HOFMOD_TOKEN}} | |
run: hof flow -f test/flow ./test.cue | |
- name: test/fmt | |
env: | |
GITHUB_TOKEN: ${{secrets.HOFMOD_TOKEN}} | |
run: |- | |
docker ps -a | |
hof fmt info | |
hof flow -f test/fmt ./test.cue | |
- name: test/mod | |
run: hof flow -f test/mod ./test.cue | |
env: | |
HOFMOD_SSHKEY: ${{secrets.HOFMOD_SSHKEY}} | |
GITLAB_TOKEN: ${{secrets.GITLAB_TOKEN}} | |
BITBUCKET_USERNAME: hofstadter | |
GITHUB_TOKEN: ${{secrets.HOFMOD_TOKEN}} | |
BITBUCKET_PASSWORD: ${{secrets.BITBUCKET_TOKEN}} | |
services: {} |