Update workflows #1
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: Lint and Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Setup Task | ||
uses: arduino/setup-task@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Setup golangci-lint | ||
uses: golangci/golangci-lint-action@v4 | ||
with: | ||
version: v1.57 | ||
- name: Run Lint | ||
run: task lint | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Setup Task | ||
uses: arduino/setup-task@v1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Download Dependencies | ||
run: go mod download | ||
- name: Run test | ||
run: task test | ||
build-push: | ||
name: Build and Push | ||
needs: [lint, test] | ||
if: github.event_name == 'push' && github.ref_name == 'main' | ||
uses: ./.github/workflows/build_push.yaml | ||
Check failure on line 74 in .github/workflows/main.yaml GitHub Actions / Lint and TestInvalid workflow file
|
||
with: | ||
commit: ${{ github.sha }} | ||
image-tag: develop | ||
secrets: inherit |