-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework CI #1097
Merged
Merged
Rework CI #1097
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: buildapp | ||
description: Build app | ||
|
||
inputs: | ||
DIR: | ||
description: 'app directory' | ||
required: true | ||
NAME: | ||
description: 'app name' | ||
required: true | ||
LACE_EXTENSION_KEY: | ||
description: 'Public extended manifest key' | ||
required: true | ||
BUILD_DEV_PREVIEW: | ||
description: 'Build developer preview of Lace' | ||
required: false | ||
default: 'false' | ||
POSTHOG_PRODUCTION_TOKEN_MAINNET: | ||
description: 'Post hog production mainnet token' | ||
required: false | ||
default: '' | ||
POSTHOG_PRODUCTION_TOKEN_PREPROD: | ||
description: 'Post hog production preprod token' | ||
required: false | ||
default: '' | ||
POSTHOG_PRODUCTION_TOKEN_PREVIEW: | ||
description: 'Post hog production preview token' | ||
required: false | ||
default: '' | ||
PRODUCTION_MODE_TRACKING: | ||
description: 'Enable analytics tracking in production' | ||
required: false | ||
default: 'false' | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Code check | ||
uses: ./.github/actions/check | ||
with: | ||
DIR: ${{ inputs.DIR }} | ||
|
||
- name: Build ${{ inputs.NAME }} | ||
run: yarn build | ||
shell: bash | ||
working-directory: ${{ inputs.DIR }} | ||
env: | ||
LACE_EXTENSION_KEY: ${{ inputs.LACE_EXTENSION_KEY }} | ||
BUILD_DEV_PREVIEW: ${{ inputs.BUILD_DEV_PREVIEW }} | ||
POSTHOG_PRODUCTION_TOKEN_MAINNET: ${{ inputs.POSTHOG_PRODUCTION_TOKEN_MAINNET }} | ||
POSTHOG_PRODUCTION_TOKEN_PREPROD: ${{ inputs.POSTHOG_PRODUCTION_TOKEN_PREPROD }} | ||
POSTHOG_PRODUCTION_TOKEN_PREVIEW: ${{ inputs.POSTHOG_PRODUCTION_TOKEN_PREVIEW }} | ||
PRODUCTION_MODE_TRACKING: ${{ inputs.PRODUCTION_MODE_TRACKING }} | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.NAME }} | ||
path: ${{ inputs.DIR }}/dist |
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,30 @@ | ||
name: build | ||
description: Build package | ||
|
||
inputs: | ||
DIR: | ||
description: 'package directory' | ||
required: true | ||
NAME: | ||
description: 'package name' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Code check | ||
uses: ./.github/actions/check | ||
with: | ||
DIR: ${{ inputs.DIR }} | ||
|
||
- name: Build ${{ inputs.NAME }} | ||
run: yarn build | ||
shell: bash | ||
working-directory: ${{ inputs.DIR }} | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.NAME }} | ||
path: ${{ inputs.DIR }}/dist |
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,26 @@ | ||
name: check | ||
description: Code check | ||
|
||
inputs: | ||
DIR: | ||
description: 'package directory' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Format check | ||
run: yarn format-check | ||
shell: bash | ||
working-directory: ${{ inputs.DIR }} | ||
|
||
- name: Code check | ||
run: yarn lint | ||
shell: bash | ||
working-directory: ${{ inputs.DIR }} | ||
|
||
- name: Type check | ||
run: yarn type-check | ||
shell: bash | ||
working-directory: ${{ inputs.DIR }} |
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,42 @@ | ||
name: deploy chromatic | ||
description: Deploy storybook to Chromatic | ||
|
||
inputs: | ||
TOKEN: | ||
description: 'Chromatic token' | ||
required: true | ||
DIR: | ||
description: 'Package directory' | ||
required: true | ||
NAME: | ||
description: 'Package name' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Tests | ||
working-directory: ./${{ inputs.DIR }} | ||
run: yarn test-storybook:ci | ||
shell: bash | ||
|
||
- name: Publish to Chromatic | ||
if: github.ref != 'refs/heads/main' | ||
uses: chromaui/action@v1 | ||
with: | ||
projectToken: ${{ inputs.TOKEN }} | ||
workingDir: ./${{ inputs.DIR }} | ||
buildScriptName: build-storybook | ||
onlyChanged: true | ||
exitOnceUploaded: true | ||
|
||
- name: Publish to Chromatic and auto accept changes | ||
if: github.ref == 'refs/heads/main' | ||
uses: chromaui/action@v1 | ||
with: | ||
projectToken: ${{ inputs.TOKEN }} | ||
autoAcceptChanges: true | ||
workingDir: ./${{ inputs.DIR }} | ||
onlyChanged: true | ||
exitOnceUploaded: true |
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,35 @@ | ||
name: setup and install | ||
description: Setup Node.js and install dependencies | ||
|
||
inputs: | ||
WALLET_PASSWORD: | ||
description: 'Test wallet password' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
|
||
- name: Node modules cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
**/node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
run: yarn install --immutable --inline-builds | ||
shell: bash | ||
|
||
- name: Decrypt test data | ||
working-directory: ./packages/e2e-tests | ||
run: ./decrypt_secret.sh | ||
shell: bash | ||
env: | ||
WALLET_1_PASSWORD: ${{ inputs.WALLET_PASSWORD }} |
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,123 @@ | ||
name: smoke | ||
description: Execute e2e smoke tests | ||
|
||
inputs: | ||
WALLET_PASSWORD: | ||
description: 'Test wallet password' | ||
required: true | ||
|
||
TEST_DAPP_URL: | ||
description: 'Test DApp Url' | ||
required: true | ||
|
||
GITHUB_TOKEN: | ||
description: 'Github token' | ||
required: true | ||
|
||
E2E_AWS_ACCESS_KEY_ID: | ||
description: 'AWS access key id' | ||
required: true | ||
|
||
E2E_AWS_SECRET_ACCESS_KEY: | ||
description: 'AWS secret access key' | ||
required: true | ||
|
||
E2E_REPORTS_USER: | ||
description: 'E2E reports user' | ||
required: true | ||
|
||
E2E_REPORTS_PASSWORD: | ||
description: 'E2E reports password' | ||
required: true | ||
|
||
E2E_REPORTS_URL: | ||
description: 'E2E reports url' | ||
required: true | ||
|
||
RUN: | ||
description: 'Runner number' | ||
required: true | ||
|
||
BRANCH: | ||
description: 'Branch' | ||
required: true | ||
|
||
TAGS: | ||
description: 'tags' | ||
required: false | ||
default: '@Smoke and @Testnet' | ||
|
||
BROWSER: | ||
description: 'browser' | ||
required: false | ||
default: 'chrome' | ||
|
||
DISPLAY: | ||
description: '' | ||
required: false | ||
default: ':99.0' | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Start XVFB | ||
shell: bash | ||
env: | ||
DISPLAY: ${{ inputs.DISPLAY }} | ||
run: | | ||
Xvfb :99 & | ||
|
||
- name: Execute e2e smoke tests | ||
shell: bash | ||
id: e2e-tests | ||
working-directory: ./packages/e2e-tests | ||
env: | ||
WALLET_1_PASSWORD: ${{ inputs.WALLET_PASSWORD }} | ||
TEST_DAPP_URL: ${{ inputs.TEST_DAPP_URL }} | ||
TAGS: ${{ inputs.TAGS }} | ||
BROWSER: ${{ inputs.BROWSER }} | ||
RUN: ${{ inputs.RUN }} | ||
DISPLAY: ${{ inputs.DISPLAY }} | ||
BRANCH: ${{ inputs.BRANCH }} | ||
run: yarn wdio run wdio.conf.${{ inputs.BROWSER }}.ts --cucumberOpts.tags="@Smoke and not @Pending" | ||
|
||
- name: Create allure properties | ||
shell: bash | ||
if: always() | ||
working-directory: ./packages/e2e-tests/reports/allure/results | ||
run: | | ||
echo " | ||
branch=${{ inputs.BRANCH }} | ||
browser=${{ inputs.BROWSER }} | ||
tags=${{ inputs.TAGS }} | ||
platform=Linux | ||
" > environment.properties | ||
|
||
- name: Publish allure report to S3 | ||
uses: andrcuns/[email protected] | ||
if: always() | ||
env: | ||
GITHUB_AUTH_TOKEN: ${{ inputs.GITHUB_TOKEN }} | ||
AWS_ACCESS_KEY_ID: ${{ inputs.E2E_AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ inputs.E2E_AWS_SECRET_ACCESS_KEY }} | ||
with: | ||
storageType: s3 | ||
resultsGlob: './packages/e2e-tests/reports/allure/results' | ||
bucket: lace-e2e-test-results | ||
prefix: 'smoke/linux/${{ inputs.BROWSER }}/${{ inputs.RUN }}' | ||
copyLatest: true | ||
ignoreMissingResults: true | ||
updatePr: comment | ||
baseUrl: 'https://${{ inputs.E2E_REPORTS_USER }}:${{ inputs.E2E_REPORTS_PASSWORD }}@${{ inputs.E2E_REPORTS_URL }}' | ||
|
||
- name: Publish artifacts (logs, reports, screenshots) | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: test-artifacts | ||
path: | | ||
./packages/e2e-tests/screenshots | ||
./packages/e2e-tests/logs | ||
./packages/e2e-tests/reports | ||
retention-days: 5 |
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,14 @@ | ||
name: unit | ||
description: Execute unit tests | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: Unit tests | ||
run: yarn test | ||
shell: bash | ||
env: | ||
AVAILABLE_CHAINS: 'Preprod,Preview,Mainnet' | ||
DEFAULT_CHAIN: 'Preprod' | ||
NODE_OPTIONS: '--max_old_space_size=8192' |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has been missed when icons package has been created.