Manage CLI tools by aquaproj/aqua #434
Workflow file for this run
This file contains hidden or 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: | |
pull_request: | |
push: | |
branches: | |
- 'main' | |
env: | |
cache-version: 1 | |
jobs: | |
validation: | |
name: Validation | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Setup Aqua | |
uses: ./.github/actions/setup-aqua | |
- name: Cache Tools | |
id: cache-tools | |
uses: actions/cache@v4 | |
with: | |
path: | | |
bin | |
include | |
key: cache-${{ env.cache-version }}-${{ hashFiles('go.mod') }}-${{ hashFiles('Makefile') }} | |
- run: make setup | |
if: steps.cache-tools.outputs.cache-hit != 'true' | |
- run: make validate | |
- run: make check-generate | |
build: | |
name: build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- run: docker buildx build --load -t moco-agent:dev . | |
test: | |
name: Small Tests | |
strategy: | |
matrix: | |
mysql-version: ["8.0.28", "8.0.39", "8.0.40", "8.0.41", "8.4.4"] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Setup Aqua | |
uses: ./.github/actions/setup-aqua | |
- run: make test MYSQL_VERSION=${{ matrix.mysql-version }} |