-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b31c7a7
commit a423975
Showing
1 changed file
with
30 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,45 @@ | ||
name: "ci" | ||
name: "nightly" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
spec: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby_version: | ||
- '2.7' | ||
- '3.2' | ||
runs_on: | ||
- 'ubuntu-latest' | ||
- 'windows-latest' | ||
|
||
name: "Spec : ${{ matrix.runs_on }} Ruby ${{ matrix.ruby_version }}" | ||
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main" | ||
secrets: "inherit" | ||
with: | ||
ruby_version: ${{ matrix.ruby_version }} | ||
runs_on: ${{ matrix.runs_on }} | ||
rake_task: 'gem_revendor test_languageserver test_languageserver_sidecar test_debugserver' | ||
|
||
acceptance: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby_version: | ||
- '2.7' | ||
- '3.2' | ||
include: | ||
- ruby_version: '2.7' | ||
puppet_version: '~> 7.0' | ||
- ruby_version: '3.2' | ||
puppet_version: '~> 8.0' | ||
runs_on: | ||
- 'ubuntu-latest' | ||
- 'windows-latest' | ||
name: "acceptance" | ||
runs-on: windows-latest | ||
|
||
name: "Acceptance : ${{ matrix.runs_on }} Ruby ${{ matrix.ruby_version }}" | ||
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@main" | ||
secrets: "inherit" | ||
with: | ||
ruby_version: ${{ matrix.ruby_version }} | ||
runs_on: ${{ matrix.runs_on }} | ||
rake_task: 'gem_revendor acceptance_languageserver' | ||
puppet_version: ${{ matrix.puppet_version }} | ||
env: | ||
PUPPET_GEM_VERSION: '~> 8.0' | ||
|
||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby_version: | ||
- '2.7' | ||
- '3.2' | ||
name: "Build Editor Service (Ruby ${{ matrix.ruby_version }})" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ruby/setup-ruby@v1 | ||
|
||
- name: "checkout" | ||
uses: "actions/checkout@v4" | ||
|
||
- name: "export environment" | ||
run: | | ||
echo "PUPPET_VERSION='~> 8.0'" >> $GITHUB_ENV | ||
echo "PUPPET_GEM_VERSION=${{ env.PUPPET_GEM_VERSION }}" >> $GITHUB_ENV | ||
- name: "setup ruby" | ||
uses: "ruby/setup-ruby@v1" | ||
with: | ||
ruby-version: ${{ matrix.ruby_version }} | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
- name: Set build version | ||
shell: pwsh | ||
|
||
- name: "bundle environment" | ||
run: | | ||
'99.99.0-gh.${{ github.run_number }}' | Out-File -FilePath 'lib\puppet_editor_services\VERSION' -Encoding ASCII -Confirm:$false -Force | ||
- name: Run rake gem_revendor build | ||
run: bundle exec rake gem_revendor build | ||
- name: 'Upload Artifact' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: puppet-editor-services | ||
path: output/*.zip | ||
retention-days: 2 | ||
echo ::group::bundler environment | ||
bundle env | ||
echo ::endgroup:: | ||
- name: "execute acceptance tests" | ||
run: | | ||
# This generic task to run acceptance tests. | ||
# It should be overridden in the Rakefile. | ||
bundle exec rake gem_revendor acceptance_languageserver | ||