fix: removed CGO dependency #833
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: Run tests | |
on: [ push, pull_request ] | |
permissions: | |
contents: write | |
pull-requests: write | |
actions: write | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
go-version: ['1.21.x'] | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
id: go | |
- name: Install Task | |
uses: arduino/setup-task@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Go modules cache | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-go-modules | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go${{ matrix.go-version }}-build-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go${{ matrix.go-version }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-go${{ matrix.go-version }}-build- | |
${{ runner.os }}-go${{ matrix.go-version }}- | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
args: --issues-exit-code=0 --timeout=5m | |
- name: Run tests | |
run: | | |
make cover | |
make build | |
mkdir -p output | |
mv bin/mach-composer output/mach-composer | |
cp coverage.out output/coverage.out | |
- name: Upload to codecov | |
uses: codecov/[email protected] | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: output | |
path: output/**/* | |
- name: Prepare release | |
if: github.ref == 'refs/heads/main' && github.event.type != 'pull_request' | |
uses: labd/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |