-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Github Action Workflow for all dapps (#1901)
* chore: add github action workflows based on the test dapp template for all dapps * chore: remove dapp-token-economy
- Loading branch information
1 parent
48033d7
commit 559c5ed
Showing
6 changed files
with
492 additions
and
0 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,82 @@ | ||
name: Test Dapp Autoswap | ||
|
||
# run CI on pushes to master, and on all PRs (even the ones that target other | ||
# branches) | ||
|
||
on: | ||
push: | ||
branches: [ $default-branch ] | ||
pull_request: | ||
|
||
jobs: | ||
test-dapp: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: ['14.x'] | ||
|
||
steps: | ||
|
||
- name: Checkout agoric-sdk | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: cache node modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/yarn | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
# Select a branch on dapp to test against by adding text to the body of the | ||
# pull request. For example: #dapp-encouragement-branch: zoe-release-0.7.0 | ||
# The default is 'main' | ||
- name: Get the appropriate dapp branch | ||
id: get-branch | ||
uses: actions/github-script@0.9.0 | ||
with: | ||
result-encoding: string | ||
script: | | ||
let branch = 'main'; | ||
if (context.payload.pull_request) { | ||
const { body } = context.payload.pull_request; | ||
const regex = /.*\#dapp-autoswap-branch:\s+(\S+)/; | ||
const result = regex.exec(body); | ||
if (result) { | ||
branch = result[1]; | ||
} | ||
} | ||
console.log(branch); | ||
return branch; | ||
- name: yarn install | ||
run: yarn install | ||
# 'yarn build' loops over all workspaces | ||
- name: yarn build | ||
run: yarn build | ||
- name: yarn link | ||
run: | | ||
yarn link-cli ~/bin/agoric | ||
echo "::add-path::/home/runner/bin" | ||
- name: Check out dapp | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: Agoric/dapp-autoswap | ||
path: dapp | ||
ref: ${{steps.get-branch.outputs.result}} | ||
|
||
- name: Agoric install in dapp | ||
run: agoric install | ||
working-directory: ./dapp | ||
|
||
- name: yarn build in dapp | ||
run: yarn build | ||
working-directory: ./dapp | ||
|
||
- name: yarn test in dapp | ||
run: yarn test | ||
working-directory: ./dapp |
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,82 @@ | ||
name: Test Dapp Card Store | ||
|
||
# run CI on pushes to master, and on all PRs (even the ones that target other | ||
# branches) | ||
|
||
on: | ||
push: | ||
branches: [ $default-branch ] | ||
pull_request: | ||
|
||
jobs: | ||
test-dapp: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: ['14.x'] | ||
|
||
steps: | ||
|
||
- name: Checkout agoric-sdk | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: cache node modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/yarn | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
# Select a branch on dapp to test against by adding text to the body of the | ||
# pull request. For example: #dapp-encouragement-branch: zoe-release-0.7.0 | ||
# The default is 'main' | ||
- name: Get the appropriate dapp branch | ||
id: get-branch | ||
uses: actions/github-script@0.9.0 | ||
with: | ||
result-encoding: string | ||
script: | | ||
let branch = 'main'; | ||
if (context.payload.pull_request) { | ||
const { body } = context.payload.pull_request; | ||
const regex = /.*\#dapp-card-store-branch:\s+(\S+)/; | ||
const result = regex.exec(body); | ||
if (result) { | ||
branch = result[1]; | ||
} | ||
} | ||
console.log(branch); | ||
return branch; | ||
- name: yarn install | ||
run: yarn install | ||
# 'yarn build' loops over all workspaces | ||
- name: yarn build | ||
run: yarn build | ||
- name: yarn link | ||
run: | | ||
yarn link-cli ~/bin/agoric | ||
echo "::add-path::/home/runner/bin" | ||
- name: Check out dapp | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: Agoric/dapp-card-store | ||
path: dapp | ||
ref: ${{steps.get-branch.outputs.result}} | ||
|
||
- name: Agoric install in dapp | ||
run: agoric install | ||
working-directory: ./dapp | ||
|
||
- name: yarn build in dapp | ||
run: yarn build | ||
working-directory: ./dapp | ||
|
||
- name: yarn test in dapp | ||
run: yarn test | ||
working-directory: ./dapp |
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,82 @@ | ||
name: Test Dapp Fungible Faucet | ||
|
||
# run CI on pushes to master, and on all PRs (even the ones that target other | ||
# branches) | ||
|
||
on: | ||
push: | ||
branches: [ $default-branch ] | ||
pull_request: | ||
|
||
jobs: | ||
test-dapp: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: ['14.x'] | ||
|
||
steps: | ||
|
||
- name: Checkout agoric-sdk | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: cache node modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/yarn | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
# Select a branch on dapp to test against by adding text to the body of the | ||
# pull request. For example: #dapp-encouragement-branch: zoe-release-0.7.0 | ||
# The default is 'main' | ||
- name: Get the appropriate dapp branch | ||
id: get-branch | ||
uses: actions/github-script@0.9.0 | ||
with: | ||
result-encoding: string | ||
script: | | ||
let branch = 'main'; | ||
if (context.payload.pull_request) { | ||
const { body } = context.payload.pull_request; | ||
const regex = /.*\#dapp-fungible-faucet-branch:\s+(\S+)/; | ||
const result = regex.exec(body); | ||
if (result) { | ||
branch = result[1]; | ||
} | ||
} | ||
console.log(branch); | ||
return branch; | ||
- name: yarn install | ||
run: yarn install | ||
# 'yarn build' loops over all workspaces | ||
- name: yarn build | ||
run: yarn build | ||
- name: yarn link | ||
run: | | ||
yarn link-cli ~/bin/agoric | ||
echo "::add-path::/home/runner/bin" | ||
- name: Check out dapp | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: Agoric/dapp-fungible-faucet | ||
path: dapp | ||
ref: ${{steps.get-branch.outputs.result}} | ||
|
||
- name: Agoric install in dapp | ||
run: agoric install | ||
working-directory: ./dapp | ||
|
||
- name: yarn build in dapp | ||
run: yarn build | ||
working-directory: ./dapp | ||
|
||
- name: yarn test in dapp | ||
run: yarn test | ||
working-directory: ./dapp |
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,82 @@ | ||
name: Test Dapp Oracle | ||
|
||
# run CI on pushes to master, and on all PRs (even the ones that target other | ||
# branches) | ||
|
||
on: | ||
push: | ||
branches: [ $default-branch ] | ||
pull_request: | ||
|
||
jobs: | ||
test-dapp: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: ['14.x'] | ||
|
||
steps: | ||
|
||
- name: Checkout agoric-sdk | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: cache node modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/yarn | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
# Select a branch on dapp to test against by adding text to the body of the | ||
# pull request. For example: #dapp-encouragement-branch: zoe-release-0.7.0 | ||
# The default is 'main' | ||
- name: Get the appropriate dapp branch | ||
id: get-branch | ||
uses: actions/github-script@0.9.0 | ||
with: | ||
result-encoding: string | ||
script: | | ||
let branch = 'main'; | ||
if (context.payload.pull_request) { | ||
const { body } = context.payload.pull_request; | ||
const regex = /.*\#dapp-oracle-branch:\s+(\S+)/; | ||
const result = regex.exec(body); | ||
if (result) { | ||
branch = result[1]; | ||
} | ||
} | ||
console.log(branch); | ||
return branch; | ||
- name: yarn install | ||
run: yarn install | ||
# 'yarn build' loops over all workspaces | ||
- name: yarn build | ||
run: yarn build | ||
- name: yarn link | ||
run: | | ||
yarn link-cli ~/bin/agoric | ||
echo "::add-path::/home/runner/bin" | ||
- name: Check out dapp | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: Agoric/dapp-oracle | ||
path: dapp | ||
ref: ${{steps.get-branch.outputs.result}} | ||
|
||
- name: Agoric install in dapp | ||
run: agoric install | ||
working-directory: ./dapp | ||
|
||
- name: yarn build in dapp | ||
run: yarn build | ||
working-directory: ./dapp | ||
|
||
- name: yarn test in dapp | ||
run: yarn test | ||
working-directory: ./dapp |
Oops, something went wrong.