use mise for ci #483
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: unit-tests | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Src Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - run: mkdir -p .cache/tools ~/go/pkg/mod ~/.cache/go-build | |
| - name: Cache tools and Go | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .cache/tools | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-${{ runner.arch }}-cache-${{ hashFiles('tools/tools.conf', '**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ runner.arch }}-cache- | |
| - uses: jdx/mise-action@v3 | |
| with: | |
| experimental: true | |
| - name: Build | |
| env: | |
| GOPROXY: "https://proxy.golang.org" | |
| run: just build | |
| - name: Check | |
| env: | |
| GOPROXY: "https://proxy.golang.org" | |
| run: just check | |
| - name: Tests | |
| env: | |
| GOPROXY: "https://proxy.golang.org" | |
| CI: true | |
| run: just test | |
| test-qemu: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| arch: [arm64] | |
| steps: | |
| - name: Src Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - run: mkdir -p .cache/tools ~/go/pkg/mod ~/.cache/go-build | |
| - name: Cache tools and Go | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .cache/tools | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-${{ runner.arch }}-cache-${{ hashFiles('tools/tools.conf', '**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ runner.arch }}-cache- | |
| - uses: jdx/mise-action@v3 | |
| with: | |
| experimental: true | |
| - name: Install QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Build | |
| env: | |
| GOPROXY: "https://proxy.golang.org" | |
| GOARCH: ${{ matrix.arch }} | |
| run: just build | |
| - name: Tests | |
| env: | |
| GOPROXY: "https://proxy.golang.org" | |
| GOARCH: ${{ matrix.arch }} | |
| CI: true | |
| run: just test |