From 578a9790afcd8eb45ab2941eb9f3c52e037fad90 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Thu, 20 Aug 2020 14:27:05 +0300 Subject: [PATCH 01/24] commented tests --- .github/workflows/build-go-packages.yml | 167 ++++++++++++------------ 1 file changed, 83 insertions(+), 84 deletions(-) diff --git a/.github/workflows/build-go-packages.yml b/.github/workflows/build-go-packages.yml index de9b5fc..b5f90e4 100644 --- a/.github/workflows/build-go-packages.yml +++ b/.github/workflows/build-go-packages.yml @@ -1,4 +1,4 @@ -name: Generate Go.js +name: Generate Go package on: # TODO: currently workflow dispatch endpoint does not work. I will investigate workflow_dispatch: @@ -18,7 +18,7 @@ env: jobs: build_go: - name: Build Go ${{ github.event.inputs.VERSION }} ${{ matrix.platform }} + name: Build Go ${{ github.event.inputs.VERSION }} [${{ matrix.platform }}] runs-on: ubuntu-latest strategy: fail-fast: false @@ -50,86 +50,85 @@ jobs: name: go-${{ env.VERSION }}-${{ matrix.platform }} path: /home/runner/work/go-versions/artifact - test_go: - name: Test Go ${{ github.event.inputs.VERSION }} ${{ matrix.platform }} - needs: build_go - runs-on: ${{ matrix.os }}-latest - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu - platform: linux - - os: macos - platform: darwin - - os: windows - platform: win32 - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - - name: Set AGENT_TOOLSDIRECTORY variable - if: matrix.platform == 'win32' - run: | - # GitHub Windows images don't have `AGENT_TOOLSDIRECTORY` variable - echo ::set-env name=AGENT_TOOLSDIRECTORY::$RUNNER_TOOL_CACHE - shell: bash - - - name: Fully cleanup the toolcache directory before testing - run: | - ./helpers/clean-toolcache.ps1 -ToolName "go" - shell: pwsh - - - name: Download artifact - uses: actions/download-artifact@v2 - with: - path: ${{ runner.temp }} - - - name: Extract files - run: | - if ('${{ matrix.platform }}' -eq 'win32') { - $artifactName = "go-${{ env.VERSION }}-${{ matrix.platform }}-${{ env.ARCHITECTURE }}.7z" - 7z.exe x "$artifactName" -y | Out-Null - } else { - $artifactName = "go-${{ env.VERSION }}-${{ matrix.platform }}-${{ env.ARCHITECTURE }}.tar.gz" - tar -xzf $artifactName - } - working-directory: ${{ runner.temp }}/go-${{ env.VERSION }}-${{ matrix.platform }} - shell: pwsh - - - name: Apply build artifact to the local machine - run: | - if ('${{ matrix.platform }}' -eq 'win32') { powershell ./setup.ps1 } else { sh ./setup.sh } - working-directory: ${{ runner.temp }}/go-${{ env.VERSION }}-${{ matrix.platform }} - shell: pwsh - - - name: Setup Go ${{ env.VERSION }} - uses: actions/setup-go@v2.1.1 - with: - go-version: ${{ env.VERSION }} - - - name: Wait for the logs - run: | - Write-Host "Fake step that do nothing" - Write-Host "We need it because log of previous step 'Setup Go' is not available here yet." - Write-Host "In testing step (Go.Tests.ps1) we analyze build log of 'Setup Go' task" - Write-Host "to determine if Go.js version was consumed from cache and was downloaded" - shell: pwsh - - - name: Run tests - run: | - Install-Module Pester -Force -Scope CurrentUser -RequiredVersion 4.10.1 - Import-Module Pester - $pesterParams = @{ - Path="./Go.Tests.ps1"; - Parameters=@{ - Version="$env:VERSION"; - } - } - Invoke-Pester -Script $pesterParams -EnableExit -OutputFile "test_results.xml" -OutputFormat NUnitXml - working-directory: ./tests - shell: pwsh + # test_go: + # name: Test Go ${{ github.event.inputs.VERSION }} ${{ matrix.platform }} + # needs: build_go + # runs-on: ${{ matrix.os }}-latest + # strategy: + # fail-fast: false + # matrix: + # include: + # - os: ubuntu-latest + # platform: linux + # - os: macos-latest + # platform: darwin + # - os: windows-latest + # platform: win32 + # steps: + # - uses: actions/checkout@v2 + # with: + # submodules: true + + # - name: Set AGENT_TOOLSDIRECTORY variable + # if: matrix.platform == 'win32' + # run: | + # # GitHub Windows images don't have `AGENT_TOOLSDIRECTORY` variable + # echo ::set-env name=AGENT_TOOLSDIRECTORY::$RUNNER_TOOL_CACHE + # shell: bash + + # - name: Fully cleanup the toolcache directory before testing + # run: ./helpers/clean-toolcache.ps1 -ToolName "go" + # shell: pwsh + + # - name: Download artifact + # uses: actions/download-artifact@v2 + # with: + # path: ${{ runner.temp }} + + # - name: Extract files + # run: | + # if ('${{ matrix.platform }}' -eq 'win32') { + # $artifactName = "go-${{ env.VERSION }}-${{ matrix.platform }}-${{ env.ARCHITECTURE }}.7z" + # 7z.exe x "$artifactName" -y | Out-Null + # } else { + # $artifactName = "go-${{ env.VERSION }}-${{ matrix.platform }}-${{ env.ARCHITECTURE }}.tar.gz" + # tar -xzf $artifactName + # } + # working-directory: ${{ runner.temp }}/go-${{ env.VERSION }}-${{ matrix.platform }} + # shell: pwsh + + # - name: Apply build artifact to the local machine + # run: | + # if ('${{ matrix.platform }}' -eq 'win32') { powershell ./setup.ps1 } else { sh ./setup.sh } + # working-directory: ${{ runner.temp }}/go-${{ env.VERSION }}-${{ matrix.platform }} + # shell: pwsh + + # - name: Setup Go ${{ env.VERSION }} + # uses: actions/setup-go@v2.1.1 + # with: + # go-version: ${{ env.VERSION }} + + # - name: Wait for the logs + # run: | + # Write-Host "Fake step that do nothing" + # Write-Host "We need it because log of previous step 'Setup Go' is not available here yet." + # Write-Host "In testing step (Go.Tests.ps1) we analyze build log of 'Setup Go' task" + # Write-Host "to determine if Go.js version was consumed from cache and was downloaded" + # shell: pwsh + + # - name: Run tests + # run: | + # Install-Module Pester -Force -Scope CurrentUser -RequiredVersion 4.10.1 + # Import-Module Pester + # $pesterParams = @{ + # Path="./Go.Tests.ps1"; + # Parameters=@{ + # Version="$env:VERSION"; + # } + # } + # Invoke-Pester -Script $pesterParams -EnableExit -OutputFile "test_results.xml" -OutputFormat NUnitXml + # working-directory: ./tests + # shell: pwsh publish_release: name: Publish release @@ -177,8 +176,8 @@ jobs: asset_name: go-${{ env.VERSION }}-${{ matrix.platform }}-${{ env.ARCHITECTURE }}.${{ matrix.extension }} asset_content_type: application/zip - create_pr: - name: Create Pull Request + trigger_pr: + name: Trigger Pull Request needs: upload_assets runs-on: ubuntu-latest steps: From ef31b88f8bd1dad6840769cb437b2585686877a8 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Thu, 20 Aug 2020 14:30:23 +0300 Subject: [PATCH 02/24] commented tests --- .github/workflows/build-go-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-go-packages.yml b/.github/workflows/build-go-packages.yml index b5f90e4..73d79b1 100644 --- a/.github/workflows/build-go-packages.yml +++ b/.github/workflows/build-go-packages.yml @@ -133,7 +133,7 @@ jobs: publish_release: name: Publish release if: github.event.inputs.PUBLISH_RELEASES == 'true' - needs: test_go + # needs: test_go runs-on: ubuntu-latest outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} From f7ebcc07a5f0060699eeaf4061d6a3728cd194ec Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 21 Aug 2020 09:41:43 +0300 Subject: [PATCH 03/24] fixed upload --- .github/workflows/build-go-packages.yml | 47 +++++++++++-------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build-go-packages.yml b/.github/workflows/build-go-packages.yml index 73d79b1..edb2d81 100644 --- a/.github/workflows/build-go-packages.yml +++ b/.github/workflows/build-go-packages.yml @@ -6,7 +6,7 @@ on: VERSION: description: 'Go version to build and upload' required: true - default: '14.2.0' + default: '1.15.0' PUBLISH_RELEASES: description: 'Whether to publish releases' required: true @@ -138,6 +138,8 @@ jobs: outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} steps: + - uses: actions/download-artifact@v2 + - name: Publish Release ${{ env.VERSION }} id: create_release uses: actions/create-release@v1 @@ -147,34 +149,25 @@ jobs: tag_name: ${{ env.VERSION }}-${{ github.run_id }} release_name: ${{ env.VERSION }} body: | - Upload Go.js ${{ env.VERSION }} - upload_assets: - name: Upload assets for ${{ matrix.platform }} - needs: publish_release - runs-on: ubuntu-latest - env: - UPLOAD_URL: ${{ needs.publish_release.outputs.upload_url }} - strategy: - matrix: - extension: ['tar.gz'] - platform: [linux, darwin] - include: - - platform: win32 - extension: 7z - steps: - - uses: actions/download-artifact@v2 - with: - name: go-${{ env.VERSION }}-${{ matrix.platform }} + Upload Go ${{ env.VERSION }} - - name: Upload Release Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload release assets + uses: actions/github-script@v2 with: - upload_url: ${{ env.UPLOAD_URL }} - asset_path: ./go-${{ env.VERSION }}-${{ matrix.platform }}-${{ env.ARCHITECTURE }}.${{ matrix.extension }} - asset_name: go-${{ env.VERSION }}-${{ matrix.platform }}-${{ env.ARCHITECTURE }}.${{ matrix.extension }} - asset_content_type: application/zip + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const fs = require('fs'); + for (let artifactDir of fs.readdirSync('.')) { + let artifactName = fs.readdirSync(`${artifactDir}`)[0]; + console.log(`Upload ${artifactName} asset`); + github.repos.uploadReleaseAsset({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: ${{ steps.create_release.outputs.id }}, + name: artifactName, + data: fs.readFileSync(`./${artifactDir}/${artifactName}`) + }); + } trigger_pr: name: Trigger Pull Request From f473ac37b24b30173f742ae851925cfba4bdfc7a Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 21 Aug 2020 09:43:30 +0300 Subject: [PATCH 04/24] fixed trigger_pr --- .github/workflows/build-go-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-go-packages.yml b/.github/workflows/build-go-packages.yml index edb2d81..c45601e 100644 --- a/.github/workflows/build-go-packages.yml +++ b/.github/workflows/build-go-packages.yml @@ -171,7 +171,7 @@ jobs: trigger_pr: name: Trigger Pull Request - needs: upload_assets + needs: publish_release runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From a191e6dfd7654a4cde6240df062fc91f3678841a Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 21 Aug 2020 11:33:12 +0300 Subject: [PATCH 05/24] fixed trigger_pr --- .github/workflows/build-go-packages.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-go-packages.yml b/.github/workflows/build-go-packages.yml index c45601e..f0ad3ac 100644 --- a/.github/workflows/build-go-packages.yml +++ b/.github/workflows/build-go-packages.yml @@ -170,20 +170,15 @@ jobs: } trigger_pr: - name: Trigger Pull Request - needs: publish_release + name: Trigger "Create Pull Request" workflow + needs: publish_release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: - submodules: true - - name: Trigger "Create Pull Request" workflow uses: actions/github-script@v2 with: github-token: ${{ secrets.PERSONAL_TOKEN }} script: | - # TODO: currently 'actions.createWorkflowDispatch' function does not work. I will investigate github.repos.createDispatchEvent({ owner: context.repo.owner, repo: context.repo.repo, From b060b66e678133a40b1454d9acc6098218c43c6e Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 21 Aug 2020 13:35:15 +0300 Subject: [PATCH 06/24] fixed tests --- .github/workflows/build-go-packages.yml | 142 ++++++++++++------------ 1 file changed, 69 insertions(+), 73 deletions(-) diff --git a/.github/workflows/build-go-packages.yml b/.github/workflows/build-go-packages.yml index f0ad3ac..3c38d36 100644 --- a/.github/workflows/build-go-packages.yml +++ b/.github/workflows/build-go-packages.yml @@ -49,86 +49,82 @@ jobs: with: name: go-${{ env.VERSION }}-${{ matrix.platform }} path: /home/runner/work/go-versions/artifact + test_go: + name: Test Go ${{ github.event.inputs.VERSION }} [${{ matrix.platform }}] + needs: build_go + runs-on: ${{ matrix.os }} + env: + ARTIFACT_NAME: go-${{ github.event.inputs.VERSION }}-${{ matrix.platform }}-x64 + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + platform: linux + - os: macos-latest + platform: darwin + - os: windows-latest + platform: win32 + steps: + - uses: actions/checkout@v2 + with: + submodules: true - # test_go: - # name: Test Go ${{ github.event.inputs.VERSION }} ${{ matrix.platform }} - # needs: build_go - # runs-on: ${{ matrix.os }}-latest - # strategy: - # fail-fast: false - # matrix: - # include: - # - os: ubuntu-latest - # platform: linux - # - os: macos-latest - # platform: darwin - # - os: windows-latest - # platform: win32 - # steps: - # - uses: actions/checkout@v2 - # with: - # submodules: true - - # - name: Set AGENT_TOOLSDIRECTORY variable - # if: matrix.platform == 'win32' - # run: | - # # GitHub Windows images don't have `AGENT_TOOLSDIRECTORY` variable - # echo ::set-env name=AGENT_TOOLSDIRECTORY::$RUNNER_TOOL_CACHE - # shell: bash - - # - name: Fully cleanup the toolcache directory before testing - # run: ./helpers/clean-toolcache.ps1 -ToolName "go" - # shell: pwsh + - name: Fully cleanup the toolcache directory before testing + run: ./helpers/clean-toolcache.ps1 -ToolName "go" + shell: pwsh - # - name: Download artifact - # uses: actions/download-artifact@v2 - # with: - # path: ${{ runner.temp }} + - name: Download artifact + uses: actions/download-artifact@v2 + with: + path: ${{ runner.temp }} - # - name: Extract files - # run: | - # if ('${{ matrix.platform }}' -eq 'win32') { - # $artifactName = "go-${{ env.VERSION }}-${{ matrix.platform }}-${{ env.ARCHITECTURE }}.7z" - # 7z.exe x "$artifactName" -y | Out-Null - # } else { - # $artifactName = "go-${{ env.VERSION }}-${{ matrix.platform }}-${{ env.ARCHITECTURE }}.tar.gz" - # tar -xzf $artifactName - # } - # working-directory: ${{ runner.temp }}/go-${{ env.VERSION }}-${{ matrix.platform }} - # shell: pwsh + - name: Extract files + run: | + if ('${{ matrix.platform }}' -eq 'win32') { + $artifactName = "${{ env.ARTIFACT_NAME }}.7z" + 7z.exe x "$artifactName" -y | Out-Null + } else { + $artifactName = "${{ env.ARTIFACT_NAME }}.tar.gz" + tar -xzf $artifactName + } + working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }} + shell: pwsh - # - name: Apply build artifact to the local machine - # run: | - # if ('${{ matrix.platform }}' -eq 'win32') { powershell ./setup.ps1 } else { sh ./setup.sh } - # working-directory: ${{ runner.temp }}/go-${{ env.VERSION }}-${{ matrix.platform }} - # shell: pwsh + - name: Apply build artifact to the local machine + run: | + if ('${{ matrix.platform }}' -eq 'win32') { powershell ./setup.ps1 } else { sh ./setup.sh } + working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }} + shell: pwsh - # - name: Setup Go ${{ env.VERSION }} - # uses: actions/setup-go@v2.1.1 - # with: - # go-version: ${{ env.VERSION }} + - name: Setup Go ${{ env.VERSION }} + uses: actions/setup-go@v2.1.1 + with: + go-version: ${{ env.VERSION }} - # - name: Wait for the logs - # run: | - # Write-Host "Fake step that do nothing" - # Write-Host "We need it because log of previous step 'Setup Go' is not available here yet." - # Write-Host "In testing step (Go.Tests.ps1) we analyze build log of 'Setup Go' task" - # Write-Host "to determine if Go.js version was consumed from cache and was downloaded" - # shell: pwsh + - name: Wait for the logs + run: | + Write-Host "Fake step that do nothing" + Write-Host "We need it because log of previous step 'Setup Go' is not available here yet." + Write-Host "In testing step (Go.Tests.ps1) we analyze build log of 'Setup Go' task" + Write-Host "to determine if Go.js version was consumed from cache and was downloaded" + Write-Host "Random values:" + for ($i = 0; $i -lt 200; $i++) { Get-Random } + shell: pwsh - # - name: Run tests - # run: | - # Install-Module Pester -Force -Scope CurrentUser -RequiredVersion 4.10.1 - # Import-Module Pester - # $pesterParams = @{ - # Path="./Go.Tests.ps1"; - # Parameters=@{ - # Version="$env:VERSION"; - # } - # } - # Invoke-Pester -Script $pesterParams -EnableExit -OutputFile "test_results.xml" -OutputFormat NUnitXml - # working-directory: ./tests - # shell: pwsh + - name: Run tests + run: | + Install-Module Pester -Force -Scope CurrentUser -RequiredVersion 4.10.1 + Import-Module Pester + $pesterParams = @{ + Path="./Go.Tests.ps1"; + Parameters=@{ + Version="$env:VERSION"; + } + } + Invoke-Pester -Script $pesterParams -EnableExit + working-directory: ./tests + shell: pwsh publish_release: name: Publish release From d15dc09dceaadf83c6ab16947e76c4fcb47527bf Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 21 Aug 2020 13:36:13 +0300 Subject: [PATCH 07/24] removed comment --- .github/workflows/build-go-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-go-packages.yml b/.github/workflows/build-go-packages.yml index 3c38d36..3ccd756 100644 --- a/.github/workflows/build-go-packages.yml +++ b/.github/workflows/build-go-packages.yml @@ -129,7 +129,7 @@ jobs: publish_release: name: Publish release if: github.event.inputs.PUBLISH_RELEASES == 'true' - # needs: test_go + needs: test_go runs-on: ubuntu-latest outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} From ac0268361ad365e79c7b4eb527c6c87b2ab5ec33 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 21 Aug 2020 14:43:07 +0300 Subject: [PATCH 08/24] updated build-go-packages and create-pr --- .github/workflows/build-go-packages.yml | 18 ++++++------------ .github/workflows/create-pr.yml | 17 ++++++----------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-go-packages.yml b/.github/workflows/build-go-packages.yml index 3ccd756..ae4237f 100644 --- a/.github/workflows/build-go-packages.yml +++ b/.github/workflows/build-go-packages.yml @@ -1,6 +1,5 @@ name: Generate Go package on: -# TODO: currently workflow dispatch endpoint does not work. I will investigate workflow_dispatch: inputs: VERSION: @@ -20,6 +19,8 @@ jobs: build_go: name: Build Go ${{ github.event.inputs.VERSION }} [${{ matrix.platform }}] runs-on: ubuntu-latest + env: + ARTIFACT_NAME: go-${{ github.event.inputs.VERSION }}-${{ matrix.platform }}-x64 strategy: fail-fast: false matrix: @@ -29,17 +30,9 @@ jobs: with: submodules: true - - name: Create artifact directories - run: | - binariesDirectory=$RUNNER_WORKSPACE/binaries - echo ::set-env name=BINARIES_DIRECTORY::$binariesDirectory - mkdir $binariesDirectory - artifactDirectory=$RUNNER_WORKSPACE/artifact - echo ::set-env name=ARTIFACT_DIRECTORY::$artifactDirectory - mkdir $artifactDirectory - name: Build Go ${{ env.VERSION }} run: | - ./builders/build-go.ps1 -Version $env:VERSION ` + ./builders/build-node.ps1 -Version $env:VERSION ` -Platform ${{ matrix.platform }} ` -Architecture $env:ARCHITECTURE shell: pwsh @@ -47,8 +40,9 @@ jobs: - name: Publish artifact uses: actions/upload-artifact@v2 with: - name: go-${{ env.VERSION }}-${{ matrix.platform }} - path: /home/runner/work/go-versions/artifact + name: ${{ env.ARTIFACT_NAME }} + path: ${{ runner.temp }}/artifact + test_go: name: Test Go ${{ github.event.inputs.VERSION }} [${{ matrix.platform }}] needs: build_go diff --git a/.github/workflows/create-pr.yml b/.github/workflows/create-pr.yml index 64922ad..0d03c0f 100644 --- a/.github/workflows/create-pr.yml +++ b/.github/workflows/create-pr.yml @@ -1,14 +1,11 @@ name: Create Pull Request -on: -# TODO: currently workflow dispatch endpoint does not work. I will investigate +on: repository_dispatch: types: [create-pr] workflow_dispatch: jobs: - build: + create_pr: name: Create Pull Request - env: - REPOSITORY_NAME: 'go-versions' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -18,18 +15,16 @@ jobs: - name: Create versions-manifest.json shell: pwsh run: | - ./helpers/packages-generation/manifest-generator.ps1 -GitHubRepositoryOwner "${{github.repository_owner}}" ` - -GitHubRepositoryName "$env:REPOSITORY_NAME"` - -GitHubAccessToken "${{secrets.GITHUB_TOKEN}}"` - -OutputFile "./versions-manifest.json"` + ./helpers/packages-generation/manifest-generator.ps1 -RepositoryFullName "$env:GITHUB_REPOSITORY" ` + -GitHubAccessToken "${{secrets.GITHUB_TOKEN}}" ` + -OutputFile "./versions-manifest.json" ` -ConfigurationFile "./config/go-manifest-config.json" - name: Create GitHub PR shell: pwsh run: | $formattedDate = Get-Date -Format "MM/dd/yyyy" ./helpers/github/create-pull-request.ps1 ` - -RepositoryOwner "${{github.repository_owner}}" ` - -RepositoryName "$env:REPOSITORY_NAME" ` + -RepositoryFullName "$env:GITHUB_REPOSITORY" ` -AccessToken "${{secrets.GITHUB_TOKEN}}" ` -BranchName "update-versions-manifest-file" ` -CommitMessage "Update versions-manifest" ` From fb64cc95188b651557a90b38632ad901820c24db Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 21 Aug 2020 15:03:50 +0300 Subject: [PATCH 09/24] update --- helpers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers b/helpers index 68072be..ad34347 160000 --- a/helpers +++ b/helpers @@ -1 +1 @@ -Subproject commit 68072bedefb41436c6b70ddfa9adb8e631a3b6cf +Subproject commit ad343472b2d3f24488c959d590d83aa9d0101127 From 68a3a5f1962b65e5fd9ee546d79456c1093b90e8 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 21 Aug 2020 16:22:42 +0300 Subject: [PATCH 10/24] updated helpers --- .gitmodules | 2 +- helpers | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 891db83..c2b7e50 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "helpers"] path = helpers url = https://github.com/actions/versions-package-tools - branch = main + branch = v-mazhuk/test-branch diff --git a/helpers b/helpers index ad34347..1314c6d 160000 --- a/helpers +++ b/helpers @@ -1 +1 @@ -Subproject commit ad343472b2d3f24488c959d590d83aa9d0101127 +Subproject commit 1314c6de07d9052cb47c157e2babe11e9396ba23 From d7cde8ccbd1aaf43fe04fed51243eaf3afb45742 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 21 Aug 2020 16:52:27 +0300 Subject: [PATCH 11/24] fixed build-go-packages --- .github/workflows/build-go-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-go-packages.yml b/.github/workflows/build-go-packages.yml index ae4237f..420da0a 100644 --- a/.github/workflows/build-go-packages.yml +++ b/.github/workflows/build-go-packages.yml @@ -32,7 +32,7 @@ jobs: - name: Build Go ${{ env.VERSION }} run: | - ./builders/build-node.ps1 -Version $env:VERSION ` + ./builders/build-go.ps1 -Version $env:VERSION ` -Platform ${{ matrix.platform }} ` -Architecture $env:ARCHITECTURE shell: pwsh From dddb2abf8e1a191e7cdbb0137d577607e3a48751 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 11:20:23 +0300 Subject: [PATCH 12/24] updated build-go-packages.yml --- .github/workflows/build-go-packages.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-go-packages.yml b/.github/workflows/build-go-packages.yml index 420da0a..2b3e658 100644 --- a/.github/workflows/build-go-packages.yml +++ b/.github/workflows/build-go-packages.yml @@ -13,7 +13,6 @@ on: env: VERSION: ${{ github.event.inputs.VERSION }} - ARCHITECTURE: x64 jobs: build_go: @@ -31,11 +30,10 @@ jobs: submodules: true - name: Build Go ${{ env.VERSION }} + shell: pwsh run: | ./builders/build-go.ps1 -Version $env:VERSION ` - -Platform ${{ matrix.platform }} ` - -Architecture $env:ARCHITECTURE - shell: pwsh + -Platform ${{ matrix.platform }} - name: Publish artifact uses: actions/upload-artifact@v2 @@ -47,6 +45,9 @@ jobs: name: Test Go ${{ github.event.inputs.VERSION }} [${{ matrix.platform }}] needs: build_go runs-on: ${{ matrix.os }} + defaults: + run: + shell: pwsh env: ARTIFACT_NAME: go-${{ github.event.inputs.VERSION }}-${{ matrix.platform }}-x64 strategy: @@ -66,7 +67,6 @@ jobs: - name: Fully cleanup the toolcache directory before testing run: ./helpers/clean-toolcache.ps1 -ToolName "go" - shell: pwsh - name: Download artifact uses: actions/download-artifact@v2 @@ -83,13 +83,11 @@ jobs: tar -xzf $artifactName } working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }} - shell: pwsh - name: Apply build artifact to the local machine run: | if ('${{ matrix.platform }}' -eq 'win32') { powershell ./setup.ps1 } else { sh ./setup.sh } working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }} - shell: pwsh - name: Setup Go ${{ env.VERSION }} uses: actions/setup-go@v2.1.1 @@ -104,7 +102,6 @@ jobs: Write-Host "to determine if Go.js version was consumed from cache and was downloaded" Write-Host "Random values:" for ($i = 0; $i -lt 200; $i++) { Get-Random } - shell: pwsh - name: Run tests run: | @@ -118,7 +115,6 @@ jobs: } Invoke-Pester -Script $pesterParams -EnableExit working-directory: ./tests - shell: pwsh publish_release: name: Publish release From 2b590589182d5837d5442367da98bb6f04ca7040 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 12:48:47 +0300 Subject: [PATCH 13/24] updated build-go.ps1 --- builders/build-go.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/builders/build-go.ps1 b/builders/build-go.ps1 index e92f082..dd84a4b 100644 --- a/builders/build-go.ps1 +++ b/builders/build-go.ps1 @@ -28,6 +28,14 @@ param( Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "nix-helpers.psm1") -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "win-helpers.psm1") -DisableNameChecking +function Create-ArtifactDirectories { + $env:BINARIES_DIRECTORY = Join-Path $env:RUNNER_TEMP "binaries" + New-Item -Path $env:BINARIES_DIRECTORY -ItemType "directory" + + $env:ARTIFACT_DIRECTORY = Join-Path $env:RUNNER_TEMP "artifact" + New-Item -Path $env:ARTIFACT_DIRECTORY -ItemType "directory" +} + function Get-GoBuilder { <# .SYNOPSIS @@ -66,6 +74,8 @@ function Get-GoBuilder { return $builder } +Create-ArtifactDirectories + ### Create Go builder instance, and build artifact $Builder = Get-GoBuilder -Version $Version -Platform $Platform -Architecture $Architecture $Builder.Build() From 463ba460cd46f1e5f5574406f83c6503ce3999de Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 13:05:34 +0300 Subject: [PATCH 14/24] updated Go.Tests.ps1 --- tests/Go.Tests.ps1 | 52 +++++++++------------------------------------- 1 file changed, 10 insertions(+), 42 deletions(-) diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index 8a108c1..6f9edf2 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -7,17 +7,13 @@ Import-Module (Join-Path $PSScriptRoot "../helpers/pester-extensions.psm1") Import-Module (Join-Path $PSScriptRoot "../helpers/common-helpers.psm1") function Get-UseGoLogs { - $homeDir = $env:HOME - if ([string]::IsNullOrEmpty($homeDir)) { - # GitHub Windows images don't have `HOME` variable - $homeDir = $env:HOMEDRIVE - } - + # GitHub Windows images don't have `HOME` variable + $homeDir = $env:HOME ?? $env:HOMEDRIVE $logsFolderPath = Join-Path -Path $homeDir -ChildPath "runners/*/_diag/pages" -Resolve $useGoLogFile = Get-ChildItem -Path $logsFolderPath | Where-Object { $logContent = Get-Content $_.Fullname -Raw - return $logContent -match "GoTool" + return $logContent -match "setup-go@v" } | Select-Object -First 1 return $useGoLogFile.Fullname } @@ -28,18 +24,17 @@ Describe "Go" { } It "version is correct" { - $versionOutput = Invoke-Expression -Command "go version" - $finalVersion = $Version.ToString(3) - If ($Version.Build -eq "0"){ - $finalVersion = $Version.ToString(2) - } - $versionOutput | Should -Match $finalVersion + $versionOutput = Invoke-Expression "go --version" + $versionOutput | Should -Match $Version } It "is used from tool-cache" { $goPath = (Get-Command "go").Path $goPath | Should -Not -BeNullOrEmpty - $expectedPath = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath "go" + + # GitHub Windows images don't have `AGENT_TOOLSDIRECTORY` variable + $toolcacheDir = $env:AGENT_TOOLSDIRECTORY ?? $env:RUNNER_TOOL_CACHE + $expectedPath = Join-Path -Path $toolcacheDir -ChildPath "go" $goPath.startsWith($expectedPath) | Should -BeTrue -Because "'$goPath' is not started with '$expectedPath'" } @@ -48,33 +43,6 @@ Describe "Go" { $useGoLogFile = Get-UseGoLogs $useGoLogFile | Should -Exist $useGoLogContent = Get-Content $useGoLogFile -Raw - $useGoLogContent | Should -Match "Found tool in cache" - } - - Set-Location -Path "source" - $sourceLocation = Get-Location - - It "Run simple code" { - $simpleLocation = Join-Path -Path $sourceLocation -ChildPath "simple" - Set-Location -Path $simpleLocation - "go run simple.go" | Should -ReturnZeroExitCode - "go build simple.go" | Should -ReturnZeroExitCode - "./simple" | Should -ReturnZeroExitCode - } - - It "Run maps code" { - $mapsLocation = Join-Path -Path $sourceLocation -ChildPath "maps" - Set-Location -Path $mapsLocation - "go run maps.go" | Should -ReturnZeroExitCode - "go build maps.go" | Should -ReturnZeroExitCode - "./maps" | Should -ReturnZeroExitCode - } - - It "Run methods code" { - $methodsLocation = Join-Path -Path $sourceLocation -ChildPath "methods" - Set-Location -Path $methodsLocation - "go run methods.go" | Should -ReturnZeroExitCode - "go build methods.go" | Should -ReturnZeroExitCode - "./methods" | Should -ReturnZeroExitCode + $useGoLogContent | Should -Match "Found cache" } } \ No newline at end of file From 151fce70e383f096088fb911aa467b45b5c88142 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 14:33:46 +0300 Subject: [PATCH 15/24] fixed tests --- tests/Go.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index 6f9edf2..a11fd73 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -24,7 +24,7 @@ Describe "Go" { } It "version is correct" { - $versionOutput = Invoke-Expression "go --version" + $versionOutput = Invoke-Expression "go version" $versionOutput | Should -Match $Version } From 61a336f5ca38f79cc07141244e72ec9854201906 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 15:00:11 +0300 Subject: [PATCH 16/24] fixed go tests --- tests/Go.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index a11fd73..e65f24f 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -25,7 +25,7 @@ Describe "Go" { It "version is correct" { $versionOutput = Invoke-Expression "go version" - $versionOutput | Should -Match $Version + $versionOutput | Should -Match "go version '$Version' linux/amd64" } It "is used from tool-cache" { From 41d8e92a16222edd49acc9b577110ea2bc8df6db Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 15:14:55 +0300 Subject: [PATCH 17/24] fixed go tests --- tests/Go.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index e65f24f..a508870 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -25,7 +25,7 @@ Describe "Go" { It "version is correct" { $versionOutput = Invoke-Expression "go version" - $versionOutput | Should -Match "go version '$Version' linux/amd64" + $versionOutput | Should -Match "go version go'$Version' linux/amd64" } It "is used from tool-cache" { From 95934dc44f31774b7ac4887315e2562cfa493394 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 15:25:18 +0300 Subject: [PATCH 18/24] fixed tests --- tests/Go.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index a508870..5fcf868 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -25,7 +25,7 @@ Describe "Go" { It "version is correct" { $versionOutput = Invoke-Expression "go version" - $versionOutput | Should -Match "go version go'$Version' linux/amd64" + $versionOutput | Should -Match "go version go$Version linux/amd64" } It "is used from tool-cache" { From 484f52594b4d4cc0db6b9edea840cabf516074d3 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 15:44:39 +0300 Subject: [PATCH 19/24] fixed "version is correct" test --- tests/Go.Tests.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index 5fcf868..b9a393c 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -24,8 +24,9 @@ Describe "Go" { } It "version is correct" { - $versionOutput = Invoke-Expression "go version" - $versionOutput | Should -Match "go version go$Version linux/amd64" + $(go version) -match "go(?\d+\.\d+\.\d+)" | Out-Null + $versionOutput = $Matches.Version + $versionOutput | Should -Match $Version } It "is used from tool-cache" { From 934ec78fc824990f1c361b4a078feed7423107ad Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 16:42:58 +0300 Subject: [PATCH 20/24] updated "version is correct" test --- tests/Go.Tests.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index b9a393c..c20410e 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -24,8 +24,7 @@ Describe "Go" { } It "version is correct" { - $(go version) -match "go(?\d+\.\d+\.\d+)" | Out-Null - $versionOutput = $Matches.Version + $versionOutput = '$(go version) -match "go(?\d+\.\d+\.\d+)" | Out-Null', ' Write-Host $Matches.Version' | Invoke-Expression $versionOutput | Should -Match $Version } From 8daa2b0ac5cbcced0ff44a784e10cf126125f350 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 16:50:14 +0300 Subject: [PATCH 21/24] fixed Invoke-Expression --- tests/Go.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index c20410e..32041d0 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -24,7 +24,7 @@ Describe "Go" { } It "version is correct" { - $versionOutput = '$(go version) -match "go(?\d+\.\d+\.\d+)" | Out-Null', ' Write-Host $Matches.Version' | Invoke-Expression + $versionOutput = '$(go version) -match "go(?\d+\.\d+\.\d+)" | Out-Null', ' $Matches.Version' | Invoke-Expression $versionOutput | Should -Match $Version } From e3b3c821ce51062ee2fe7b8597e7341eba51e4e2 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 17:59:30 +0300 Subject: [PATCH 22/24] Remove Create-ArtifactDirectories function --- builders/build-go.ps1 | 10 ---------- builders/go-builder.psm1 | 23 +++++++++++++---------- tests/Go.Tests.ps1 | 2 +- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/builders/build-go.ps1 b/builders/build-go.ps1 index dd84a4b..e92f082 100644 --- a/builders/build-go.ps1 +++ b/builders/build-go.ps1 @@ -28,14 +28,6 @@ param( Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "nix-helpers.psm1") -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "../helpers" | Join-Path -ChildPath "win-helpers.psm1") -DisableNameChecking -function Create-ArtifactDirectories { - $env:BINARIES_DIRECTORY = Join-Path $env:RUNNER_TEMP "binaries" - New-Item -Path $env:BINARIES_DIRECTORY -ItemType "directory" - - $env:ARTIFACT_DIRECTORY = Join-Path $env:RUNNER_TEMP "artifact" - New-Item -Path $env:ARTIFACT_DIRECTORY -ItemType "directory" -} - function Get-GoBuilder { <# .SYNOPSIS @@ -74,8 +66,6 @@ function Get-GoBuilder { return $builder } -Create-ArtifactDirectories - ### Create Go builder instance, and build artifact $Builder = Get-GoBuilder -Version $Version -Platform $Platform -Architecture $Architecture $Builder.Build() diff --git a/builders/go-builder.psm1 b/builders/go-builder.psm1 index 3efc496..cad3ebc 100644 --- a/builders/go-builder.psm1 +++ b/builders/go-builder.psm1 @@ -1,25 +1,25 @@ class GoBuilder { <# .SYNOPSIS - Base Go builder class. + Base Node.js builder class. .DESCRIPTION - Base Go builder class that contains general builder methods. + Base Node.js builder class that contains general builder methods. .PARAMETER Version - The version of Go that should be built. + The version of Node.js that should be built. .PARAMETER Platform - The platform of Go that should be built. + The platform of Node.js that should be built. .PARAMETER Architecture - The architecture with which Go should be built. + The architecture with which Node.js should be built. .PARAMETER TempFolderLocation - The location of temporary files that will be used during Go package generation. Using system BUILD_STAGINGDIRECTORY variable value. + The location of temporary files that will be used during Node.js package generation. .PARAMETER ArtifactLocation - The location of generated Go artifact. Using system environment BUILD_BINARIESDIRECTORY variable value. + The location of generated Node.js artifact. .PARAMETER InstallationTemplatesLocation The location of installation script template. Using "installers" folder from current repository. @@ -40,9 +40,8 @@ class GoBuilder { $this.Architecture = $architecture $this.TempFolderLocation = [IO.Path]::GetTempPath() - $this.WorkFolderLocation = $env:BINARIES_DIRECTORY - $this.ArtifactFolderLocation = $env:ARTIFACT_DIRECTORY - + $this.WorkFolderLocation = Join-Path $env:RUNNER_TEMP "binaries" + $this.ArtifactFolderLocation = Join-Path $env:RUNNER_TEMP "artifact" $this.InstallationTemplatesLocation = Join-Path -Path $PSScriptRoot -ChildPath "../installers" } @@ -95,6 +94,10 @@ class GoBuilder { Generates Go artifact from downloaded binaries. #> + Write-Host "Create WorkFolderLocation and ArtifactFolderLocation folders" + New-Item -Path $this.WorkFolderLocation -ItemType "directory" + New-Item -Path $this.ArtifactFolderLocation -ItemType "directory" + Write-Host "Download Go $($this.Version) [$($this.Architecture)] executable..." $binariesArchivePath = $this.Download() diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index 32041d0..3aa1a51 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -24,7 +24,7 @@ Describe "Go" { } It "version is correct" { - $versionOutput = '$(go version) -match "go(?\d+\.\d+\.\d+)" | Out-Null', ' $Matches.Version' | Invoke-Expression + $versionOutput = '$(go version) -match "go(?\d+\.\d+\.\d+)" | Out-Null', '$Matches.Version' | Invoke-Expression $versionOutput | Should -Match $Version } From 01def397b3dee13b4ca0133851f42fa24acc12e0 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 19:05:27 +0300 Subject: [PATCH 23/24] fixed tests --- tests/Go.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index 3aa1a51..a11fd73 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -24,7 +24,7 @@ Describe "Go" { } It "version is correct" { - $versionOutput = '$(go version) -match "go(?\d+\.\d+\.\d+)" | Out-Null', '$Matches.Version' | Invoke-Expression + $versionOutput = Invoke-Expression "go version" $versionOutput | Should -Match $Version } From f85ea7516c1a52e680555c71a42f39f0ef15d7d6 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Mon, 24 Aug 2020 19:28:31 +0300 Subject: [PATCH 24/24] fixed tests --- tests/Go.Tests.ps1 | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index a11fd73..d52d522 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -24,8 +24,12 @@ Describe "Go" { } It "version is correct" { - $versionOutput = Invoke-Expression "go version" - $versionOutput | Should -Match $Version + $versionOutput = Invoke-Expression -Command "go version" + $finalVersion = $Version.ToString(3) + If ($Version.Build -eq "0"){ + $finalVersion = $Version.ToString(2) + } + $versionOutput | Should -Match $finalVersion } It "is used from tool-cache" { @@ -43,6 +47,33 @@ Describe "Go" { $useGoLogFile = Get-UseGoLogs $useGoLogFile | Should -Exist $useGoLogContent = Get-Content $useGoLogFile -Raw - $useGoLogContent | Should -Match "Found cache" + $useGoLogContent | Should -Match "Found in cache" + } + + Set-Location -Path "source" + $sourceLocation = Get-Location + + It "Run simple code" { + $simpleLocation = Join-Path -Path $sourceLocation -ChildPath "simple" + Set-Location -Path $simpleLocation + "go run simple.go" | Should -ReturnZeroExitCode + "go build simple.go" | Should -ReturnZeroExitCode + "./simple" | Should -ReturnZeroExitCode + } + + It "Run maps code" { + $mapsLocation = Join-Path -Path $sourceLocation -ChildPath "maps" + Set-Location -Path $mapsLocation + "go run maps.go" | Should -ReturnZeroExitCode + "go build maps.go" | Should -ReturnZeroExitCode + "./maps" | Should -ReturnZeroExitCode + } + + It "Run methods code" { + $methodsLocation = Join-Path -Path $sourceLocation -ChildPath "methods" + Set-Location -Path $methodsLocation + "go run methods.go" | Should -ReturnZeroExitCode + "go build methods.go" | Should -ReturnZeroExitCode + "./methods" | Should -ReturnZeroExitCode } } \ No newline at end of file