oh-my-posh/.github/workflows/code.yml
2024-11-04 12:15:40 +01:00

36 lines
965 B
YAML

on:
pull_request:
paths-ignore:
- 'README.md'
- 'CONTRIBUTING.md'
- 'COPYING'
- 'website/**'
- '.github/*.md'
- '.github/FUNDING.yml'
name: Validate Code
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ${{ github.workspace }}/src
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Install Go 🗳
uses: ./.github/workflows/composite/bootstrap-go
- name: Golang CI
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8
with:
working-directory: src
- name: Fieldalignment
run: |
go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
fieldalignment "./..."
- name: Unit Tests
run: go test -v ./...