diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 18f75d1e..00799c83 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -1,14 +1,15 @@ name: e2e +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + on: workflow_dispatch: schedule: # At the end of every day - cron: "0 0 * * *" -env: - SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }} - jobs: test: strategy: @@ -16,20 +17,30 @@ jobs: matrix: os: [macos-latest, windows-latest, ubuntu-latest] package: [packages/shorebird_cli] + branch: [stable, main] runs-on: ${{ matrix.os }} + env: + SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }} + SHOREBIRD_HOSTED_URL: ${{ matrix.branch == 'stable' && 'https://api.shorebird.dev' || 'https://api-dev.shorebird.dev' }} + steps: - name: ๐Ÿ“š Git Checkout uses: actions/checkout@v3 with: - ref: stable + ref: ${{ matrix.branch }} - - name: Add Shorebird to macOS/Linux PATH + - name: ๐Ÿ–ฅ๏ธ Add Shorebird to macOS/Linux PATH shell: bash if: runner.os != 'Windows' run: echo "${GITHUB_WORKSPACE}/bin/" >> $GITHUB_PATH + - name: ๐Ÿ–ฅ๏ธ Add Shorebird to Windows PATH + shell: pwsh + if: runner.os == 'Windows' + run: Add-Content $env:GITHUB_PATH "${env:GITHUB_WORKSPACE}\bin" + - name: ๐Ÿฆ Verify Shorebird Installation (macOS / Linux) if: runner.os != 'Windows' run: | @@ -41,11 +52,6 @@ jobs: fi shell: bash - - name: Add Shorebird to Windows PATH - shell: pwsh - if: runner.os == 'Windows' - run: Add-Content $env:GITHUB_PATH "${env:GITHUB_WORKSPACE}\bin" - - name: ๐Ÿฆ Verify Shorebird Installation (Windows) if: runner.os == 'Windows' run: | @@ -67,6 +73,6 @@ jobs: - name: ๐ŸŽฏ Set up Flutter uses: subosito/flutter-action@v2 - - name: Run Integration Tests + - name: ๐Ÿงช Run Integration Tests run: dart test integration_test - working-directory: packages/shorebird_cli + working-directory: ${{ matrix.package }}