From 6ebe0650c84ceb8e4c2b1f7598e79515054b485b Mon Sep 17 00:00:00 2001 From: Craig Gumbley Date: Mon, 3 Oct 2022 16:09:59 +0100 Subject: [PATCH] (MAINT) Update CI workflow This commit updates the existing ci workflow so that it consumes the gem_ci reusable workflow. --- .github/workflows/ci.yml | 82 +++++----------------------------------- 1 file changed, 9 insertions(+), 73 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fc9f32e7..8f815a524 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,81 +1,17 @@ name: "ci" on: - schedule: - - cron: "0 0 * * *" - workflow_dispatch: + push: + branches: + - "maint" pull_request: branches: - "main" + schedule: + - cron: "0 0 * * *" + workflow_dispatch: jobs: - spec: - name: "spec" - runs-on: "ubuntu-latest" - - steps: - - - name: "checkout" - uses: "actions/checkout@v3" - - - 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: "rubocop" - run : | - bundle exec rubocop - - - name: "spec" - run: | - bundle exec rake spec - - acceptance: - name: "acceptance" - runs-on: "ubuntu-latest" - needs: "spec" - strategy: - matrix: - puppet: ["puppet6", "puppet7"] - - steps: - - - name: "checkout" - uses: "actions/checkout@v3" - - - 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: "provision" - run: | - bundle exec rake 'litmus:provision[docker, ubuntu]' - - - name: "install agent" - run: | - bundle exec rake 'litmus:install_agent[${{ matrix.puppet }}]' - - - name: "install module" - run: | - bundle exec rake 'litmus:install_modules_from_directory[./spec/fixtures/acceptance/modules]' - bundle exec rake litmus:install_gems - - - name: "execute tests" - run: | - bundle exec rake litmus:acceptance:parallel + ci: + uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main" + secrets: "inherit"