-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create a workflow for running e2e tests
- Loading branch information
Showing
5 changed files
with
70 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: e2e | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
firefox-version: | ||
description: The version of selenium/standalone-firefox image to use | ||
default: latest | ||
required: true | ||
chromium-version: | ||
description: The version of selenium/standalone-chrome image to use | ||
default: latest | ||
required: true | ||
kubo-version: | ||
description: The version of ipfs/kubo image to use | ||
default: latest | ||
required: true | ||
ipfs-companion-version: | ||
description: The version of ipfs-companion extension to use (defaults to building the extension from source) | ||
default: '' | ||
required: false | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v3 | ||
- name: Set up node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Download ipfs-companion | ||
if: inputs.ipfs-companion-version != '' | ||
run: ./ci/download-release-artifacts.sh | ||
env: | ||
IPFS_COMPANION_VERSION: ${{ inputs.ipfs-companion-version }} | ||
- name: Build ipfs-companion | ||
if: inputs.ipfs-companion-version == '' | ||
run: npm run release-build | ||
- name: Prepare E2E env | ||
run: npm run compose:e2e:prepare | ||
env: | ||
FIREFOX_VERSION: ${{ inputs.firefox-version }} | ||
CHROMIUM_VERSION: ${{ inputs.chromium-version }} | ||
KUBO_VERSION: ${{ inputs.kubo-version }} | ||
- name: Start E2E env | ||
run: npm run compose:e2e:up | ||
env: | ||
FIREFOX_VERSION: ${{ inputs.firefox-version }} | ||
CHROMIUM_VERSION: ${{ inputs.chromium-version }} | ||
KUBO_VERSION: ${{ inputs.kubo-version }} | ||
- name: Wait for E2E env set up to complete | ||
run: sleep 60 | ||
- name: Run E2E tests | ||
run: npm run compose:e2e:test | ||
env: | ||
IPFS_COMPANION_VERSION: ${{ inputs.ipfs-companion-version }} | ||
- name: Stop E2E env | ||
run: npm run compose:e2e:down |
This file contains 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
This file contains 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
This file contains 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
This file contains 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