Lesson20 (#25) #55
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: Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| pull-docker-image: | |
| name: Pull Docker Image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Pull conanio/conan-training image | |
| run: docker pull conanio/conan-training | |
| test-linux: | |
| needs: pull-docker-image | |
| name: Test on Linux | |
| runs-on: ubuntu-latest | |
| container: | |
| image: conanio/conan-training | |
| options: --user 0:0 | |
| strategy: | |
| matrix: | |
| lesson: [1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 14, 15, 16, 18] | |
| env: | |
| CONAN_HOME: ${{ github.workspace }}/.conan_home_${{ matrix.lesson }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Conan | |
| uses: conan-io/[email protected] | |
| - name: Run test for lesson ${{ matrix.lesson }} | |
| run: | | |
| cd lesson${{ matrix.lesson }} | |
| chmod +x test.sh | |
| ./test.sh | |
| test-macos: | |
| name: Test on macOS | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| lesson: [1, 2, 3, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18] | |
| env: | |
| CONAN_HOME: ${{ github.workspace }}/.conan_home_${{ matrix.lesson }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Conan | |
| uses: conan-io/[email protected] | |
| - name: Run test for lesson ${{ matrix.lesson }} | |
| run: | | |
| cd lesson${{ matrix.lesson }} | |
| chmod +x test.sh | |
| ./test.sh | |
| test-windows: | |
| name: Test on Windows | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| lesson: [1, 2, 3, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18] | |
| env: | |
| CONAN_HOME: ${{ github.workspace }}/.conan_home_${{ matrix.lesson }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Conan | |
| uses: conan-io/[email protected] | |
| - name: Run test for lesson ${{ matrix.lesson }} | |
| shell: pwsh | |
| run: | | |
| cd lesson${{ matrix.lesson }} | |
| ./test.ps1 |