diff options
author | Tim Smith <tsmith84@gmail.com> | 2021-04-13 19:46:38 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2021-04-14 15:06:23 -0700 |
commit | 07bbd831014b435ba37c4395b125bf4634f8b6f7 (patch) | |
tree | 09167ed3053e0ddc62a904ba7f81de166fbeaf7d | |
parent | 1adcb5fe7892535acea3e01323cfc1fe2818ad3f (diff) | |
download | chef-gh_actions.tar.gz |
Run choco tests on Windows 2016/2019gh_actions
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | .expeditor/scripts/bk_run_choco.ps1 | 9 | ||||
-rw-r--r-- | .expeditor/verify.pipeline.yml | 10 | ||||
-rw-r--r-- | .github/workflows/func_spec.yml | 25 | ||||
-rw-r--r-- | .github/workflows/lint.yml (renamed from .github/workflows/chefstyle.yml) | 2 |
4 files changed, 26 insertions, 20 deletions
diff --git a/.expeditor/scripts/bk_run_choco.ps1 b/.expeditor/scripts/bk_run_choco.ps1 deleted file mode 100644 index 49f9186701..0000000000 --- a/.expeditor/scripts/bk_run_choco.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -$CurrentDirectory = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent -$PrepScript = Join-Path $CurrentDirectory "bk_win_prep.ps1" -Invoke-Expression $PrepScript - -choco --version - -echo "+++ bundle exec rspec chocolatey_package_spec" -bundle exec rspec spec/functional/resource/chocolatey_package_spec.rb -if (-not $?) { throw "Chef chocolatey functional tests failing." } diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 4aa5fce8b8..5d55bc0d72 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -241,16 +241,6 @@ steps: - CHEF_LICENSE=accept-no-persist shell: ["powershell", "-Command"] -- label: "Chocolatey Windows :ruby: 3.0" - commands: - - /workdir/.expeditor/scripts/bk_run_choco.ps1 - expeditor: - executor: - docker: - host_os: windows - image: rubydistros/windows-2019:3.0 - shell: ["powershell", "-Command"] - - label: "Unit Windows :ruby: 3.0" commands: - /workdir/.expeditor/scripts/bk_win_unit.ps1 diff --git a/.github/workflows/func_spec.yml b/.github/workflows/func_spec.yml new file mode 100644 index 0000000000..5913fc31f4 --- /dev/null +++ b/.github/workflows/func_spec.yml @@ -0,0 +1,25 @@ +--- +name: func_spec + +"on": + pull_request: + push: + branches: + - master + +jobs: + choco: + strategy: + fail-fast: false + matrix: + os: [windows-2019, windows-2016] + # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0' + ruby: [2.7, '3.0'] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - run: bundle exec rspec spec/functional/resource/chocolatey_package_spec.rb diff --git a/.github/workflows/chefstyle.yml b/.github/workflows/lint.yml index 9d00358f76..7462be46f3 100644 --- a/.github/workflows/chefstyle.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,5 @@ --- -name: ci +name: lint "on": pull_request: |