(CDPE-7090) Leverage $LASTEXITCODE for powershell jobs #112
Workflow file for this run
This file contains hidden or 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
| name: unit-test | |
| on: | |
| - pull_request | |
| jobs: | |
| podman_tests: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 2.6 | |
| bundler-cache: false | |
| - name: install curl | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libcurl4 | |
| - name: Run bundle install | |
| run: bundle install | |
| - name: Uninstall docker | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get remove -y docker-ce | |
| - name: Install podman | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y podman | |
| - run: bundle exec rspec spec/podman_spec.rb | |
| docker_tests: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 2.6 | |
| bundler-cache: false | |
| - name: install curl | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libcurl4 | |
| - name: Run bundle install | |
| run: bundle install | |
| - name: Uninstall podman | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get remove -y podman | |
| - run: bundle exec rspec spec/docker_spec.rb | |
| unix_tests: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 2.6 | |
| bundler-cache: false | |
| - name: Run bundle install | |
| run: bundle install | |
| - run: bundle exec rspec spec/run_cd4pe_job_spec.rb | |
| windows_tests: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 2.6 | |
| bundler-cache: false | |
| - name: Run bundle install | |
| run: bundle install | |
| - run: $env:RUN_WINDOWS_UNIT_TESTS = "true"; bundle exec rspec spec/run_cd4pe_job_spec.rb |