Skip to content

Revise GitHub Action scripts #1

Revise GitHub Action scripts

Revise GitHub Action scripts #1

name: Build & Test Golang Project
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.23.2' ]
steps:
- name: checkout furiosa-smi
uses: actions/checkout@v4
with:
repository: furiosa-ai/furiosa-smi
token: ${{ secrets.TOKEN_FOR_CLONE_ANOTHER_REPO}}
path: furiosa-smi
- name: install furiosa-smi
run: |
cd furiosa-smi
rustup component add clippy rustfmt
cargo build
make install
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: build
run: make build
- name: test
run: make test
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0
- name: lint
run: make lint