diff options
author | Tim Smith <tsmith@chef.io> | 2021-04-14 17:24:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-14 17:24:03 -0700 |
commit | 03266b91e405f6038e6039d997c0b0eaa6e2da70 (patch) | |
tree | 6aedfc8a594adc8a746d6aca1976df6ab483f1b1 | |
parent | 46441540faff2e875c1553deb4c6bb63258d8c97 (diff) | |
parent | 07bbd831014b435ba37c4395b125bf4634f8b6f7 (diff) | |
download | chef-03266b91e405f6038e6039d997c0b0eaa6e2da70.tar.gz |
Merge pull request #11364 from chef/gh_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 | 20 | ||||
-rw-r--r-- | .github/workflows/func_spec.yml | 25 | ||||
-rw-r--r-- | .github/workflows/lint.yml | 21 |
4 files changed, 46 insertions, 29 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 b2f19efa8b..5d55bc0d72 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -41,16 +41,6 @@ steps: # Tests Ruby 3.0 ######################################################################### -- label: "Chefstyle :ruby: 3.0" - commands: - - /workdir/.expeditor/scripts/bk_container_prep.sh - - bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package ruby_prof - - bundle exec rake style - expeditor: - executor: - docker: - image: rubydistros/ubuntu-18.04:3.0 - - label: "Integration Ubuntu 18.04 :ruby: 3.0" commands: - /workdir/.expeditor/scripts/bk_container_prep.sh @@ -251,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/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000000..7462be46f3 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,21 @@ +--- +name: lint + +"on": + pull_request: + push: + branches: + - master + +jobs: + chefstyle: + runs-on: ubuntu-latest + env: + BUNDLE_WITHOUT: ruby_shadow:ruby_prof:omnibus_package + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7 + bundler-cache: true + - run: bundle exec rake style |