chore: Move errors to variables in the compileIdentifier method #865
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
| name: CI | |
| on: | |
| push: | |
| branches: ["*"] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: ["*"] | |
| jobs: | |
| build-test: | |
| name: "Build and Lint" | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25.3" | |
| cache: true | |
| cache-dependency-path: | | |
| **/go.sum | |
| **/go.mod | |
| - name: Install Go dependencies | |
| run: go get . | |
| - name: Build the application | |
| run: go build -buildvcs | |
| - name: Lint the code | |
| uses: golangci/golangci-lint-action@v8 | |
| - name: Create a test results directory | |
| run: mkdir test-results | |
| - name: Run tests | |
| run: | | |
| go test "./..." -coverprofile="test-results/coverage.out" -covermode=count | |
| go test "./..." -coverprofile="coverage.out" -covermode=count -json > test-report.out | |
| - name: SonarQube Scan | |
| if: github.event_name != 'pull_request' | |
| uses: SonarSource/sonarqube-scan-action@v6 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| build-binaries: | |
| name: "Build Binaries" | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25.3" | |
| cache: true | |
| cache-dependency-path: | | |
| **/go.sum | |
| **/go.mod | |
| - name: Build binaries | |
| run: ./scripts/compile-binaries.sh | |
| - name: Upload binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dlitescript-binaries | |
| path: | | |
| output/dlitescript* | |
| retention-days: 30 | |
| release: | |
| name: "Create Release" | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: build-test | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25.3" | |
| cache: true | |
| cache-dependency-path: | | |
| **/go.sum | |
| **/go.mod | |
| - name: Build binaries for release | |
| run: ./scripts/compile-binaries.sh | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: output/dlitescript* | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |