diff --git a/.github/workflows/ubuntu16_pr.yaml b/.github/workflows/ubuntu16_pr.yaml index 832ee7c..b1ccd52 100644 --- a/.github/workflows/ubuntu16_pr.yaml +++ b/.github/workflows/ubuntu16_pr.yaml @@ -1,37 +1,53 @@ name: "Test on Ubuntu 16.04" on: [push, pull_request] jobs: - LitmusAcceptance: + Acceptance: runs-on: ubuntu-16.04 + steps: - - uses: actions/checkout@v1 - - name: Set up Ruby 2.6 - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6 - - name: Prepare inventory file - run: | - cat <> inventory.yaml - --- - version: 2 - groups: - - name: local - targets: - - uri: litmus_localhost - config: - transport: local - - name: ssh_nodes - targets: [] - - name: winrm_nodes - targets: [] - EOF - - name: Install gems and puppet agent - run: | - bundle install - sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:install_agent' - - name: Install module - run: bundle exec rake 'litmus:install_module' - - name: Run acceptance tests - run: sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:acceptance:localhost' + - name: Checkout Source + uses: actions/checkout@v2 + + - name: Activate Ruby 2.7 + uses: actions/setup-ruby@v1 + with: + ruby-version: "2.7" + + - name: Cache gems + uses: actions/cache@v2 + with: + path: vendor/gems + key: ${{ runner.os }}-pr-${{ hashFiles('**/Gemfile') }} + restore-keys: | + ${{ runner.os }}-pr- + ${{ runner.os }}- + + - name: Prepare inventory file + run: | + cat <> inventory.yaml + --- + version: 2 + groups: + - name: local + targets: + - uri: litmus_localhost + config: + transport: local + - name: ssh_nodes + targets: [] + - name: winrm_nodes + targets: [] + EOF + + - name: Install gems and puppet agent + run: | + bundle install + sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:install_agent' + + - name: Install module + run: bundle exec rake 'litmus:install_module' + + - name: Run acceptance tests + run: sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:acceptance:localhost' diff --git a/.github/workflows/ubuntu18_pr.yaml b/.github/workflows/ubuntu18_pr.yaml index 4057fc1..1d5d3ab 100644 --- a/.github/workflows/ubuntu18_pr.yaml +++ b/.github/workflows/ubuntu18_pr.yaml @@ -1,37 +1,53 @@ name: "Test on Ubuntu 18.04" on: [push, pull_request] jobs: - LitmusAcceptance: + Acceptance: runs-on: ubuntu-18.04 + steps: - - uses: actions/checkout@v1 - - name: Set up Ruby 2.6 - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6 - - name: Prepare inventory file - run: | - cat <> inventory.yaml - --- - version: 2 - groups: - - name: local - targets: - - uri: litmus_localhost - config: - transport: local - - name: ssh_nodes - targets: [] - - name: winrm_nodes - targets: [] - EOF - - name: Install gems and puppet agent - run: | - bundle install - sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:install_agent' - - name: Install module - run: bundle exec rake 'litmus:install_module' - - name: Run acceptance tests - run: sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:acceptance:localhost' + - name: Checkout Source + uses: actions/checkout@v2 + + - name: Activate Ruby 2.7 + uses: actions/setup-ruby@v1 + with: + ruby-version: "2.7" + + - name: Cache gems + uses: actions/cache@v2 + with: + path: vendor/gems + key: ${{ runner.os }}-pr-${{ hashFiles('**/Gemfile') }} + restore-keys: | + ${{ runner.os }}-pr- + ${{ runner.os }}- + + - name: Prepare inventory file + run: | + cat <> inventory.yaml + --- + version: 2 + groups: + - name: local + targets: + - uri: litmus_localhost + config: + transport: local + - name: ssh_nodes + targets: [] + - name: winrm_nodes + targets: [] + EOF + + - name: Install gems and puppet agent + run: | + bundle install + sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:install_agent' + + - name: Install module + run: bundle exec rake 'litmus:install_module' + + - name: Run acceptance tests + run: sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:acceptance:localhost' diff --git a/.github/workflows/ubuntu20_pr.yaml b/.github/workflows/ubuntu20_pr.yaml index b1522bd..d8d9869 100644 --- a/.github/workflows/ubuntu20_pr.yaml +++ b/.github/workflows/ubuntu20_pr.yaml @@ -1,37 +1,53 @@ name: "Test on Ubuntu 20.04" on: [push, pull_request] jobs: - LitmusAcceptance: + Acceptance: runs-on: ubuntu-20.04 + steps: - - uses: actions/checkout@v1 - - name: Set up Ruby 2.6 - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6 - - name: Prepare inventory file - run: | - cat <> inventory.yaml - --- - version: 2 - groups: - - name: local - targets: - - uri: litmus_localhost - config: - transport: local - - name: ssh_nodes - targets: [] - - name: winrm_nodes - targets: [] - EOF - - name: Install gems and puppet agent - run: | - bundle install - sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:install_agent' - - name: Install module - run: bundle exec rake 'litmus:install_module' - - name: Run acceptance tests - run: sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:acceptance:localhost' + - name: Checkout Source + uses: actions/checkout@v2 + + - name: Activate Ruby 2.7 + uses: actions/setup-ruby@v1 + with: + ruby-version: "2.7" + + - name: Cache gems + uses: actions/cache@v2 + with: + path: vendor/gems + key: ${{ runner.os }}-pr-${{ hashFiles('**/Gemfile') }} + restore-keys: | + ${{ runner.os }}-pr- + ${{ runner.os }}- + + - name: Prepare inventory file + run: | + cat <> inventory.yaml + --- + version: 2 + groups: + - name: local + targets: + - uri: litmus_localhost + config: + transport: local + - name: ssh_nodes + targets: [] + - name: winrm_nodes + targets: [] + EOF + + - name: Install gems and puppet agent + run: | + bundle install + sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:install_agent' + + - name: Install module + run: bundle exec rake 'litmus:install_module' + + - name: Run acceptance tests + run: sudo -u root env "PATH=$PATH" bundle exec rake 'litmus:acceptance:localhost'