Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/CODEOWNERS

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: "ci"

on:
pull_request:
branches:
- "main"
workflow_dispatch:

jobs:

spec:
strategy:
fail-fast: false
matrix:
ruby_version:
- '2.5'
- '2.7'
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.5'
- '2.7'
runs_on:
- 'ubuntu-latest'
- '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'

build:
name: "Build Editor Service"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Set build version
shell: pwsh
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@v2
with:
name: puppet-editor-services
path: output/*.zip
retention-days: 2
91 changes: 0 additions & 91 deletions .github/workflows/editor-services-ci.yml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: "nightly"

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:

spec:
strategy:
fail-fast: false
matrix:
ruby_version:
- '2.5'
- '2.7'
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.5'
- '2.7'
runs_on:
- 'ubuntu-latest'
- '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'

build:
name: "Build Editor Service"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Set build version
shell: pwsh
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@v2
with:
name: puppet-editor-services
path: output/*.zip
retention-days: 2
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "release"

on:
workflow_call:
inputs:
target:
description: "The target for the release. This can be a commit sha or a branch."
required: false
default: "main"
type: "string"

jobs:
release:
name: "Release"
runs-on: "ubuntu-latest"
if: github.repository_owner == 'puppetlabs'

steps:

- name: "Checkout"
uses: "actions/checkout@v3"
with:
ref: ${{ github.event.inputs.target }}
clean: true
fetch-depth: 0

- name: "Setup ruby"
uses: "ruby/setup-ruby@v1"
with:
ruby-version: "2.7"
bundler-cache: "true"

- name: "Bundle environment"
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: "Get version"
id: "get_version"
run: |
echo "version=$(ruby -e "require 'rubygems'; puts Gem::Specification::load(Dir.glob('*.gemspec').first).version.to_s")" >> $GITHUB_OUTPUT
- name: "Build"
run: |
bundle exec rake build
- name: "Create release"
run: |
gh release create v${{ steps.get_version.outputs.version }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .github/workflows/release_prep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "release prep"

on:
workflow_dispatch:
inputs:
target:
description: "The target for the release. This can be a commit sha or a branch."
required: false
default: "main"
version:
description: "Version of gem to be released."
required: true

jobs:
release_prep:
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release_prep.yml@main"
with:
target: "${{ github.event.inputs.target }}"
version: "${{ github.events.inputs.version }}"
secrets: "inherit"
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org"
group :development do
gem 'rake', '>= 10.4', :require => false
gem 'rspec', '>= 3.2', :require => false
gem 'puppet-lint', '~> 3.3', :require => false
gem 'puppetfile-resolver', '~> 0.6.2', :require => false
gem 'yard', '~> 0.9.28', :require => false

gem "rubocop", '= 1.6.1', require: false
gem "rubocop-performance", '= 1.9.1', require: false
Expand Down