name: ci on: push: branches: [main] pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: contents: read jobs: test: name: Test (${{ matrix.os }}) runs-on: ${{ matrix.os }} timeout-minutes: 15 strategy: fail-fast: false matrix: # ermite has no macOS runner: macos-14 runs on GitHub only. os: ${{ fromJSON(github.server_url == 'https://github.com' && '["ubuntu-latest","macos-14"]' || '["ubuntu-latest"]') }} steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 with: go-version-file: go.mod - name: Install goimports run: go install golang.org/x/tools/cmd/goimports@v0.47.0 - name: Build run: go build -o vev . - name: Lint run: make lint - name: Test run: make test - name: Test installer if: matrix.os == 'ubuntu-latest' run: make test-installer - name: Cross-compile linux/arm64 if: matrix.os == 'ubuntu-latest' env: CGO_ENABLED: 0 GOARCH: arm64 GOOS: linux run: go build ./... - name: Cross-compile darwin/arm64 if: matrix.os == 'ubuntu-latest' env: CGO_ENABLED: 0 GOARCH: arm64 GOOS: darwin run: go build ./...