Skip to content

Commit

Permalink
ci: moved integration to after the release step only
Browse files Browse the repository at this point in the history
  • Loading branch information
petertonysmith94 committed Jun 19, 2024
1 parent 0b36a5a commit a654828
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 46 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/test-integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Test Integration"

on:
workflow_run:
workflow: [Release]
types:
- completed

jobs:
create-fuels-template-integration:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Test Setup
uses: ./.github/actions/test-setup
with:
should-install-bun: true

- name: Run Isolated Tests
run: pnpm test:integration
env:
PUBLISHED_NPM_VERSION: next

- name: Run UI tests
run: sh ./scripts/create-fuels-template-integration.sh
env:
PUBLISHED_NPM_VERSION: next
47 changes: 1 addition & 46 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,52 +47,10 @@ jobs:
path: coverage/environments/${{ matrix.env.name }}
overwrite: true

publish:
runs-on: ubuntu-latest
outputs:
published_version: ${{ steps.release.outputs.published_version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Test Setup
uses: ./.github/actions/test-setup

- name: Publish PR to NPM
id: release
uses: ./.github/actions/pr-release
with:
npm-token: ${{ secrets.NPM_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Echo Published Version
run: echo ${{ steps.release.outputs.published_version }}

create-fuels-template-integration:
timeout-minutes: 10
runs-on: ubuntu-latest
needs: [publish]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Test Setup
uses: ./.github/actions/test-setup

- name: Run UI tests
run: sh ./scripts/create-fuels-template-integration.sh
env:
PUBLISHED_NPM_VERSION: ${{ needs.publish.outputs.published_version }}

e2e:
runs-on: ubuntu-latest
timeout-minutes: 10
needs: [environments, publish]
if: ${{ !github.event.pull_request.draft }}
needs: [environments]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -101,8 +59,6 @@ jobs:

- name: Test Setup
uses: ./.github/actions/test-setup
with:
should-install-bun: true

- name: Pretest
run: pnpm pretest
Expand All @@ -112,7 +68,6 @@ jobs:
env:
TESTNET_WALLET_PVT_KEY: ${{ secrets.TESTNET_WALLET_PVT_KEY }}
DEVNET_WALLET_PVT_KEY: ${{ secrets.DEVNET_WALLET_PVT_KEY }}
PUBLISHED_NPM_VERSION: ${{ steps.release.outputs.published_version }}

test:
if: github.base_ref == 'master' || github.ref_name == 'master'
Expand Down

0 comments on commit a654828

Please sign in to comment.