fix: Do not open the default file that might be non existent if the value was already set #588
Workflow file for this run
This file contains hidden or 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
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| name: CI | |
| jobs: | |
| test: | |
| name: Test / Go ${{ matrix.go }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # These are the release channels. | |
| # Hermit will handle installing the right patch. | |
| go: ["1.23", "1.24"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Init Hermit | |
| run: ./bin/hermit env -r >> "$GITHUB_ENV" | |
| - name: Install Go ${{ matrix.go }} | |
| run: | | |
| hermit install go@"${GO_VERSION}" | |
| go version | |
| env: | |
| GO_VERSION: ${{ matrix.go }} | |
| - name: Test | |
| run: go test ./... | |
| test-windows: | |
| name: Test / Windows / Go ${{ matrix.go }} | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| # These are versions for GitHub's setup-go. | |
| # '.x' will pick the latest patch release. | |
| go: ["1.23.x", "1.24.x"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Test | |
| run: go test ./... | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Init Hermit | |
| run: ./bin/hermit env -r >> "$GITHUB_ENV" | |
| - name: golangci-lint | |
| run: golangci-lint run |