From dc580ed769ffcce0354ac15bc34bbeed7538f685 Mon Sep 17 00:00:00 2001 From: Kaj Kowalski Date: Sat, 24 May 2025 19:38:15 +0200 Subject: [PATCH] Update workflows (#1) * Update ci.yml * Disable codeql.yml because of private repo status * Update release.yml to set prerelease status if tag starts with v0 * Disable dependency-review.yml because of private repo status --- .github/ISSUE_TEMPLATE/bug_report.yml | 108 ++++++++++++++++++++++++ .github/workflows/ci.yml | 33 ++++---- .github/workflows/codeql.yml | 13 +-- .github/workflows/dependency-review.yml | 2 +- .github/workflows/release.yml | 2 +- 5 files changed, 132 insertions(+), 26 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index e69de29..0f92b70 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,108 @@ +name: Bug Report +description: Create a report to help us improve +title: '[BUG] ' +labels: ['bug', 'triage'] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + - type: textarea + id: bug-description + attributes: + label: Bug Description + description: A clear and concise description of what the bug is. + placeholder: Describe the bug... + validations: + required: true + + - type: textarea + id: reproduction-steps + attributes: + label: Steps to Reproduce + description: Steps to reproduce the behavior + placeholder: | + 1. Run command '...' + 2. Parse file '...' + 3. See error + value: | + 1. + 2. + 3. + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: A clear and concise description of what you expected to happen. + placeholder: What should have happened? + validations: + required: true + + - type: textarea + id: actual-behavior + attributes: + label: Actual Behavior + description: A clear and concise description of what actually happened. + placeholder: What actually happened? + validations: + required: true + + - type: textarea + id: sample-data + attributes: + label: Sample Data + description: If applicable, provide sample Articulate Rise JSON data or URLs that reproduce the issue. + placeholder: Paste sample data or URLs here... + + - type: dropdown + id: os + attributes: + label: Operating System + description: What operating system are you using? + options: + - Windows 11 + - Windows 10 + - macOS (Intel) + - macOS (Apple Silicon) + - Ubuntu + - Other Linux + - Other + validations: + required: true + + - type: input + id: go-version + attributes: + label: Go Version + description: What version of Go are you using? + placeholder: e.g. 1.21.5 + validations: + required: true + + - type: input + id: version + attributes: + label: Parser Version + description: What version or commit of the parser are you using? + placeholder: e.g. v1.0.0 or commit hash + + - type: textarea + id: error-output + attributes: + label: Error Output + description: Paste any error messages or stack traces here + render: shell + + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: | + Add any other context about the problem here, such as: + - Input file size + - Output format attempted + - Any workarounds you've found diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1b72e9..332ba65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,26 +11,20 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: [1.21.x, 1.22.x, 1.23.x] + go: [1.21.x, 1.22.x, 1.23.x, 1.24.x] steps: - uses: actions/checkout@v4 - - name: Set up Go + - name: Set up Go ${{ matrix.go }} uses: actions/setup-go@v5 with: - go-version: ${{ matrix.go-version }} - - - name: Cache Go modules - uses: actions/cache@v4 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + go-version: ${{ matrix.go }} + check-latest: true + cache-dependency-path: "**/*.sum" - name: Download dependencies - run: go mod download + run: go mod download && echo "Download successful" || go mod tidy && echo "Tidy successful" || return 1 - name: Verify dependencies run: go mod verify @@ -53,10 +47,13 @@ jobs: fi - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: - file: ./coverage.out - flags: unittests - name: codecov-umbrella - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + token: ${{ secrets.CODECOV_TOKEN }} + slug: kjanat/articulate-parser + + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e3358d7..895a198 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,12 +1,13 @@ name: CodeQL on: - push: - branches: [master, develop] - pull_request: - branches: [master] - schedule: - - cron: '30 1 * * 0' + workflow_call: + # push: + # branches: [master, develop] + # pull_request: + # branches: [master] + # schedule: + # - cron: '30 1 * * 0' jobs: analyze: diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 889faf9..d24308a 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -1,6 +1,6 @@ name: Dependency Review -on: [pull_request] +on: [workflow_call] # [pull_request] permissions: contents: read diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9fe5098..31c4ecf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,6 +42,6 @@ jobs: articulate-parser-darwin-arm64 generate_release_notes: true draft: false - prerelease: false + prerelease: ${{ startsWith(github.ref, 'refs/tags/v0.') }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}