-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from onbloc/develop
Adena update version '1.5.1'
- Loading branch information
Showing
43 changed files
with
332 additions
and
247 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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: Setup | ||
description: Set up project environment and test environment. | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
registry-url: https://registry.npmjs.org | ||
cache: yarn | ||
|
||
- uses: actions/cache@v3 | ||
id: install-cache | ||
with: | ||
path: node_modules/ | ||
key: ${{ runner.os }}-install-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- if: steps.install-cache.outputs.cache-hit != 'true' | ||
run: | | ||
npm install -g nx | ||
yarn install | ||
shell: bash |
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,96 @@ | ||
name: Build And Deploy | ||
on: | ||
workflow_run: | ||
workflows: ['Test'] | ||
branches: [qa, main] | ||
types: | ||
- completed | ||
jobs: | ||
wait-on-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: unit-tests | ||
uses: fountainhead/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
checkName: unit-tests | ||
|
||
aws-deployment: | ||
needs: wait-on-tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Remove adena-torus-signin mock repository | ||
run: | | ||
git submodule deinit packages/adena-torus-signin | ||
git rm --cached packages/adena-torus-signin | ||
rm -rf .git/modules/packages/adena-torus-signin | ||
rm -rf packages/adena-torus-signin | ||
- name: Clone adena-torus-signin repository | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.PRIVATE_ACCESS_TOKEN }} | ||
repository: onbloc/adena-torus-signin | ||
path: 'packages/adena-torus-signin' | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Reinstall dependencies | ||
run: yarn install | ||
|
||
- name: Build project | ||
run: | | ||
npx nx run-many --target=build --projects=adena-module,gno-client,adena-torus-signin | ||
npx nx run-many --target=build --projects=adena-extension | ||
- name: Make build files | ||
run: | | ||
bash scripts/build-qa.sh | ||
- name: Deploy AWS S3 (QA) | ||
uses: shallwefootball/s3-upload-action@master | ||
with: | ||
aws_key_id: ${{ secrets.AWS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} | ||
aws_bucket: ${{ secrets.AWS_BUCKET }} | ||
source_dir: 'deploy' | ||
destination_dir: '.' | ||
|
||
- name: Deploy AWS S3 (Latest) | ||
uses: shallwefootball/s3-upload-action@master | ||
with: | ||
aws_key_id: ${{ secrets.AWS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} | ||
aws_bucket: ${{ secrets.AWS_BUCKET }} | ||
source_dir: 'deploy-latest' | ||
destination_dir: '.' | ||
|
||
- name: Run notification scripts | ||
env: | ||
RESOURCE_URI: ${{ secrets.RESOURCE_URI }} | ||
HOOK_URI: ${{ secrets.HOOK_URI }} | ||
run: | | ||
bash scripts/notification-success.sh "$RESOURCE_URI" "$HOOK_URI" | ||
# TODO: Discuss and decide to adopt Chromatic UI | ||
# chromatic-deployment: | ||
# needs: wait-on-tests | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Setup | ||
# uses: ./.github/actions/setup | ||
|
||
# - name: Push chromatic UI | ||
# uses: chromaui/action@v1 | ||
# with: | ||
# projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN_2 }} | ||
# workingDir: packages/web |
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,25 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: [qa, main] | ||
pull_request: | ||
|
||
jobs: | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
submodules: true | ||
- uses: ./.github/actions/setup | ||
- run: npx nx run-many --target=build --projects=adena-module,gno-client | ||
- run: yarn run test | ||
|
||
# TODO: Apply when you're done setting up your storybook environment | ||
# storybook-tests: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: ./.github/actions/setup | ||
# - run: run test:storybook |
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
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
Oops, something went wrong.