mirror of
				https://github.com/actions/setup-go.git
				synced 2025-10-31 15:50:33 +00:00 
			
		
		
		
	Compare commits
	
		
			19 Commits
		
	
	
		
			v2.1.4
			...
			thboop/nod
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 4314d44d94 | ||
|   | 28c3d5cef9 | ||
|   | 44e221478f | ||
|   | 424fc82d43 | ||
|   | 82388ea9d4 | ||
|   | fdeec47002 | ||
|   | 3e9d5483e6 | ||
|   | 02f7ea9f09 | ||
|   | 5805cf725b | ||
|   | 35030c1fd2 | ||
|   | 59d644db2a | ||
|   | 76929df236 | ||
|   | b06835a88c | ||
|   | b8a24202e2 | ||
|   | e234d99c78 | ||
|   | 0ea1f64ec9 | ||
|   | eca066937b | ||
|   | e816064dae | ||
|   | 6eb700292f | 
							
								
								
									
										38
									
								
								.github/ISSUE_TEMPLATE/bug_report.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								.github/ISSUE_TEMPLATE/bug_report.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -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. | ||||
							
								
								
									
										1
									
								
								.github/ISSUE_TEMPLATE/config.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.github/ISSUE_TEMPLATE/config.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| blank_issues_enabled: false | ||||
							
								
								
									
										18
									
								
								.github/ISSUE_TEMPLATE/feature_request.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								.github/ISSUE_TEMPLATE/feature_request.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -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! --> | ||||
							
								
								
									
										9
									
								
								.github/pull_request_template.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								.github/pull_request_template.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -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. | ||||
							
								
								
									
										51
									
								
								.github/workflows/check-dist.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								.github/workflows/check-dist.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | ||||
| # `dist/index.js` is a special file in Actions. | ||||
| # When you reference an action with `uses:` in a workflow, | ||||
| # `index.js` is the code that will run. | ||||
| # For our project, we generate this file through a build process from other source files. | ||||
| # We need to make sure the checked-in `index.js` actually matches what we expect it to be. | ||||
| name: Check dist/ | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|     paths-ignore: | ||||
|       - '**.md' | ||||
|   pull_request: | ||||
|     paths-ignore: | ||||
|       - '**.md' | ||||
|   workflow_dispatch: | ||||
|  | ||||
| jobs: | ||||
|   check-dist: | ||||
|     runs-on: ubuntu-latest | ||||
|  | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|  | ||||
|       - name: Set Node.js 16.x | ||||
|         uses: actions/setup-node@v1 | ||||
|         with: | ||||
|           node-version: 16.x | ||||
|  | ||||
|       - name: Install dependencies | ||||
|         run: npm ci | ||||
|  | ||||
|       - name: Rebuild the dist/ directory | ||||
|         run: npm run build | ||||
|  | ||||
|       - name: Compare the expected and actual dist/ directories | ||||
|         run: | | ||||
|           if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||||
|             echo "Detected uncommitted changes after build.  See status below:" | ||||
|             git diff | ||||
|             exit 1 | ||||
|           fi | ||||
|         id: diff | ||||
|  | ||||
|       # If index.js was different than expected, upload the expected version as an artifact | ||||
|       - uses: actions/upload-artifact@v2 | ||||
|         if: ${{ failure() && steps.diff.conclusion == 'failure' }} | ||||
|         with: | ||||
|           name: dist | ||||
|           path: dist/ | ||||
							
								
								
									
										8
									
								
								.github/workflows/licensed.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/licensed.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,8 +1,12 @@ | ||||
| name: Licensed | ||||
|  | ||||
| on: | ||||
|   push: {branches: main} | ||||
|   pull_request: {branches: main} | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|   pull_request: | ||||
|     branches: | ||||
|       - main | ||||
|  | ||||
| jobs: | ||||
|   test: | ||||
|   | ||||
							
								
								
									
										2
									
								
								.github/workflows/versions.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/versions.yml
									
									
									
									
										vendored
									
									
								
							| @@ -65,10 +65,12 @@ jobs: | ||||
|     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 | ||||
|   | ||||
							
								
								
									
										7
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							| @@ -19,10 +19,11 @@ jobs: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|  | ||||
|     - name: Setup node 12 | ||||
|       uses: actions/setup-node@v1 | ||||
|       - name: Setup node 16 | ||||
|         uses: actions/setup-node@v2 | ||||
|         with: | ||||
|         node-version: 12 | ||||
|           node-version: 16 | ||||
|           cache: npm | ||||
|  | ||||
|       - name: npm install | ||||
|         run: npm install | ||||
|   | ||||
							
								
								
									
										15
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								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 | ||||
| @@ -50,7 +50,7 @@ Basic: | ||||
| ```yaml | ||||
| steps: | ||||
|   - uses: actions/checkout@master | ||||
| - uses: actions/setup-go@v1 | ||||
|   - 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 | ||||
| @@ -60,7 +60,7 @@ Matrix Testing: | ||||
| ```yaml | ||||
| jobs: | ||||
|   build: | ||||
|     runs-on: ubuntu-16.04 | ||||
|     runs-on: ubuntu-latest | ||||
|     strategy: | ||||
|       matrix: | ||||
|         go: [ '1.14', '1.13' ] | ||||
| @@ -68,12 +68,19 @@ jobs: | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|       - name: Setup go | ||||
|         uses: actions/setup-go@v1 | ||||
|         uses: actions/setup-go@v2 | ||||
|         with: | ||||
|           go-version: ${{ matrix.go }} | ||||
|       - 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) | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
| @@ -11,5 +11,5 @@ inputs: | ||||
|     description: Used to pull node distributions from go-versions.  Since there's a default, this is typically not supplied by the user. | ||||
|     default: ${{ github.token }} | ||||
| runs: | ||||
|   using: 'node12' | ||||
|   using: 'node16' | ||||
|   main: 'dist/index.js' | ||||
|   | ||||
| @@ -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, | ||||
|   | ||||
							
								
								
									
										7182
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										7182
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -30,15 +30,15 @@ | ||||
|     "semver": "^6.1.1" | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "@types/jest": "^24.0.13", | ||||
|     "@types/jest": "^27.0.2", | ||||
|     "@types/node": "^12.0.4", | ||||
|     "@types/semver": "^6.0.0", | ||||
|     "@zeit/ncc": "^0.21.0", | ||||
|     "jest": "^25.2.1", | ||||
|     "jest-circus": "^24.7.1", | ||||
|     "jest": "^27.2.5", | ||||
|     "jest-circus": "^27.2.5", | ||||
|     "nock": "^10.0.6", | ||||
|     "prettier": "^1.17.1", | ||||
|     "ts-jest": "^24.0.2", | ||||
|     "ts-jest": "^27.0.5", | ||||
|     "typescript": "^3.8.3" | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user