Skip to content

Updating to the newer versions #9

Updating to the newer versions

Updating to the newer versions #9

Workflow file for this run

name: "Acceptance tests"
on: [pull_request]
jobs:
setup_matrix:
name: "Setup Test Matrix"
runs-on: ubuntu-20.04
outputs:
matrix: ${{ steps.get-matrix.outputs.matrix }}
steps:
- name: Checkout Source
uses: actions/checkout@v2
- name: Setup Acceptance Test Matrix
id: get-matrix
run: |
MATRIX=$(cat matrix.json |tr "\n" ' '|sed 's/\s\+/ /g')
echo "::set-output name=matrix::$MATRIX"
acceptance:
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
needs:
- setup_matrix
if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
steps:
- name: Checkout Source
uses: actions/checkout@v2
- name: Activate Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
bundler-cache: true
- name: Print bundle environment
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: Provision test environment
run: |
bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
- name: Install agent
run: |
bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
- name: Install module
run: |
bundle exec rake 'litmus:install_module'
- name: Run acceptance tests
run: |
bundle exec rake 'litmus:acceptance:parallel'
- name: Remove test environment
if: ${{ always() }}
continue-on-error: true
run: |
if [[ -f inventory.yaml || -f spec/fixtures/litmus_inventory.yaml ]]; then
bundle exec rake 'litmus:tear_down'
fi