diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..d207b1802 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.go text eol=lf diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 2a5c51c8a..4e584ecc2 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -1,12 +1,23 @@ name: golangci-lint on: [pull_request] + +permissions: + contents: read + pull-requests: read + concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.actor_id }} cancel-in-progress: true + jobs: golangci: + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] name: lint - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + timeout-minutes: 15 steps: - name: Checkout code uses: actions/checkout@v3 @@ -14,7 +25,12 @@ jobs: uses: actions/setup-go@v4 with: go-version: "1.20.x" + cache: false - name: Install dependencies + if: matrix.os == 'ubuntu-latest' run: sudo apt update && sudo apt install -y -q libgtk-3-dev libayatana-appindicator3-dev libgl1-mesa-dev xorg-dev - name: golangci-lint - uses: golangci/golangci-lint-action@v3 \ No newline at end of file + uses: golangci/golangci-lint-action@v3 + with: + version: latest + args: --timeout=12m \ No newline at end of file