From 5805cf725b81b59a2257ae901ec61514e06b58ea Mon Sep 17 00:00:00 2001 From: Sergey-Murtazin <83696612+Sergey-Murtazin@users.noreply.github.com> Date: Wed, 20 Oct 2021 12:15:51 +0300 Subject: [PATCH 1/4] Add issue and pull request templates (#163) --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.md | 18 +++++++++++ .github/pull_request_template.md | 9 ++++++ 4 files changed, 66 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/pull_request_template.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..aad6a0f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a bug report +title: '' +labels: bug, needs triage +assignees: '' + +--- + +<!--- Please direct any generic questions related to actions to our support community forum at https://github.community/c/code-to-cloud/github-actions/41 ---> +<!--- Before opening up a new bug report, please make sure to check for similar existing issues --> + +**Description:** +A clear and concise description of what the bug is. + +**Action version:** +Specify the action version + +**Platform:** +- [ ] Ubuntu +- [ ] macOS +- [ ] Windows + +**Runner type:** +- [ ] Hosted +- [ ] Self-hosted + +**Tools version:** +<!--- Please specify go version --> + +**Repro steps:** +A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link. + +**Expected behavior:** +A description of what you expected to happen. + +**Actual behavior:** +A description of what is actually happening. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ec4bb38 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..1c37027 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,18 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: feature request, needs triage +assignees: '' +--- +<!--- Please direct any generic questions related to actions to our support community forum at https://github.community/c/code-to-cloud/github-actions/41 ---> +<!--- Before opening up a new feature request, please make sure to check for similar existing issues and pull requests --> + +**Description:** +Describe your proposal. + +**Justification:** +Justification or a use case for your proposal. + +**Are you willing to submit a PR?** +<!--- We accept contributions! --> \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..ef54aca --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,9 @@ +**Description:** +Describe your changes. + +**Related issue:** +Add link to the related issue. + +**Check list:** +- [ ] Mark if documentation changes are required. +- [ ] Mark if tests were added or updated to cover the changes. \ No newline at end of file From 02f7ea9f09887fd7fd6c77c49a0f72a2e8cde95c Mon Sep 17 00:00:00 2001 From: Masahiro Furudate <178inaba.git@gmail.com> Date: Mon, 8 Nov 2021 19:28:08 +0900 Subject: [PATCH 2/4] Fix yaml indent (#59) --- .../workflows/release-new-action-version.yml | 10 +++--- .github/workflows/versions.yml | 20 ++++++------ .github/workflows/workflow.yml | 30 ++++++++--------- README.md | 32 +++++++++---------- 4 files changed, 47 insertions(+), 45 deletions(-) diff --git a/.github/workflows/release-new-action-version.yml b/.github/workflows/release-new-action-version.yml index 955ced7..797c81a 100644 --- a/.github/workflows/release-new-action-version.yml +++ b/.github/workflows/release-new-action-version.yml @@ -20,8 +20,8 @@ jobs: name: releaseNewActionVersion runs-on: ubuntu-latest steps: - - name: Update the ${{ env.TAG_NAME }} tag - uses: actions/publish-action@v0.1.0 - with: - source-tag: ${{ env.TAG_NAME }} - slack-webhook: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file + - name: Update the ${{ env.TAG_NAME }} tag + uses: actions/publish-action@v0.1.0 + with: + source-tag: ${{ env.TAG_NAME }} + slack-webhook: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.github/workflows/versions.yml b/.github/workflows/versions.yml index 6b6d5f9..33a5fc6 100644 --- a/.github/workflows/versions.yml +++ b/.github/workflows/versions.yml @@ -63,12 +63,14 @@ jobs: os: [macos-latest, windows-latest, ubuntu-latest] go: [1.7, 1.8.6] steps: - - name: Checkout - uses: actions/checkout@v2 - - name: setup-go ${{ matrix.go }} - uses: ./ - with: - go-version: ${{ matrix.go }} - - name: verify go - run: __tests__/verify-go.sh ${{ matrix.go }} - shell: bash + - name: Checkout + uses: actions/checkout@v2 + + - name: setup-go ${{ matrix.go }} + uses: ./ + with: + go-version: ${{ matrix.go }} + + - name: verify go + run: __tests__/verify-go.sh ${{ matrix.go }} + shell: bash diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 274f7e9..1126e0c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -16,23 +16,23 @@ jobs: matrix: operating-system: [ubuntu-latest, windows-latest] steps: - - name: Checkout - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 - - name: Setup node 12 - uses: actions/setup-node@v1 - with: - node-version: 12 + - name: Setup node 12 + uses: actions/setup-node@v1 + with: + node-version: 12 - - name: npm install - run: npm install + - name: npm install + run: npm install - - name: Lint - run: npm run format-check + - name: Lint + run: npm run format-check - - name: npm test - run: npm test + - name: npm test + run: npm test - - name: audit packages - run: npm audit --audit-level=high - if: matrix.operating-system == 'ubuntu-latest' \ No newline at end of file + - name: audit packages + run: npm audit --audit-level=high + if: matrix.operating-system == 'ubuntu-latest' diff --git a/README.md b/README.md index 0774c7f..0edc0de 100644 --- a/README.md +++ b/README.md @@ -24,22 +24,22 @@ It will first check the local cache for a version match. If version is not found Matching by semver spec: ```yaml steps: -- uses: actions/checkout@v2 -- uses: actions/setup-go@v2 - with: - go-version: '^1.13.1' # The Go version to download (if necessary) and use. -- run: go version + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: '^1.13.1' # The Go version to download (if necessary) and use. + - run: go version ``` Matching an unstable pre-release: ```yaml steps: -- uses: actions/checkout@v2 -- uses: actions/setup-go@v2 - with: - stable: 'false' - go-version: '1.14.0-rc1' # The Go version to download (if necessary) and use. -- run: go version + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + stable: 'false' + go-version: '1.14.0-rc1' # The Go version to download (if necessary) and use. + - run: go version ``` # Usage @@ -49,11 +49,11 @@ See [action.yml](action.yml) Basic: ```yaml steps: -- uses: actions/checkout@master -- uses: actions/setup-go@v2 - with: - go-version: '1.9.3' # The Go version to download (if necessary) and use. -- run: go run hello.go + - uses: actions/checkout@master + - uses: actions/setup-go@v2 + with: + go-version: '1.9.3' # The Go version to download (if necessary) and use. + - run: go run hello.go ``` Matrix Testing: From 3e9d5483e65b0e8f5d422b71710fee65d1239a69 Mon Sep 17 00:00:00 2001 From: Sergey-Murtazin <83696612+Sergey-Murtazin@users.noreply.github.com> Date: Wed, 1 Dec 2021 14:10:32 +0300 Subject: [PATCH 3/4] Add semver note to documentation (#164) --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0edc0de..353bfcf 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The V2 offers: It will first check the local cache for a version match. If version is not found locally, It will pull it from `main` branch of [go-versions](https://github.com/actions/go-versions/blob/main/versions-manifest.json) repository and on miss or failure, it will fall back to the previous behavior of download directly from [go dist](https://storage.googleapis.com/golang). -Matching by semver spec: +Matching by [semver spec](https://github.com/npm/node-semver): ```yaml steps: - uses: actions/checkout@v2 @@ -74,6 +74,13 @@ jobs: - run: go run hello.go ``` +### Supported version syntax +The `go-version` input supports the following syntax: + +Specific versions: `1.15`, `1.16.1`, `1.17.0-rc2`, `1.16.0-beta1` +SemVer's version range syntax: `^1.13.1` +For more information about semantic versioning please refer [semver](https://github.com/npm/node-semver) documentation + # License The scripts and documentation in this project are released under the [MIT License](LICENSE) From fdeec47002800c39dbe2cd2ab93d5f853d14ba32 Mon Sep 17 00:00:00 2001 From: Dominik Honnef <dominik@honnef.co> Date: Fri, 17 Dec 2021 16:47:05 +0100 Subject: [PATCH 4/4] Don't require relative paths to start with ./ or ../ (#98) --- __tests__/setup-go.test.ts | 10 ++++++++++ matchers.json | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/__tests__/setup-go.test.ts b/__tests__/setup-go.test.ts index c90d74b..c113ccb 100644 --- a/__tests__/setup-go.test.ts +++ b/__tests__/setup-go.test.ts @@ -497,6 +497,16 @@ describe('setup-go', () => { expect(annotation.message).toBe('undefined: fmt.Printl'); }); + it('matches on unix path down the tree', async () => { + let line = 'foo/main.go:13:2: undefined: fmt.Printl'; + let annotation = testMatch(line); + expect(annotation).toBeDefined(); + expect(annotation.line).toBe(13); + expect(annotation.column).toBe(2); + expect(annotation.file).toBe('foo/main.go'); + expect(annotation.message).toBe('undefined: fmt.Printl'); + }); + it('matches on rooted unix path', async () => { let line = '/assert.go:4:1: missing return at end of function'; let annotation = testMatch(line); diff --git a/matchers.json b/matchers.json index 675fdb7..24be341 100644 --- a/matchers.json +++ b/matchers.json @@ -4,7 +4,7 @@ "owner": "go", "pattern": [ { - "regexp": "^\\s*(\\.{0,2}[\\/\\\\].+\\.go):(?:(\\d+):(\\d+):)? (.*)", + "regexp": "^\\s*(.+\\.go):(?:(\\d+):(\\d+):)? (.*)", "file": 1, "line": 2, "column": 3, @@ -13,4 +13,4 @@ ] } ] -} \ No newline at end of file +}