feat: add support for optimism chain (#1816) #51
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
name: Client Production CI/CD | |
on: | |
push: | |
branches: | |
- 'develop' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Install node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14 | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build Aragon | |
run: yarn build | |
- name: Run BundleWatch | |
run: yarn bundlewatch | |
- name: Run tests | |
run: yarn test | |
env: | |
CI: true | |
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} | |
build-deploy: | |
runs-on: ubuntu-latest | |
needs: tests | |
environment: development | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14 | |
- name: Activate fleek | |
run: cp .github/fleek/develop.fleek.json ./.fleek.json | |
- name: Install build dependencies | |
run: sudo apt-get update && sudo apt-get install -y build-essential git libusb-1.0-0 libusb-1.0-0-dev libudev-dev | |
- name: Build the client | |
env: | |
REACT_APP_DEPLOY_VERSION: ${{ github.sha }} | |
REACT_APP_DEPLOY_ENVIRONMENT: development | |
REACT_APP_ANALYTICS_KEY: ${{ secrets.REACT_APP_ANALYTICS_KEY }} | |
ARAGON_ETH_SUBSCRIPTION_EVENT_DELAY: 5000 | |
ARAGON_FORTMATIC_API_KEY: ${{ secrets.FORMATIC_API_KEY }} | |
ARAGON_PORTIS_DAPP_ID: ${{ secrets.PORTIS_DAPP_ID }} | |
# TODO remove --network-concurrency 1 once use-wallet 0.9.0 is published | |
run: yarn install --frozen-lockfile --network-concurrency 1 && yarn build | |
- name: Deploy fleek | |
id: deploy | |
uses: fleekhq/action-deploy@v1 | |
with: | |
apiKey: ${{ secrets.FLEEK_API_KEY }} | |
- name: Get the output url | |
run: echo "Deploy url is ${{ steps.deploy.outputs.deployUrl }}" | |
- name: upload sourcemap to apm | |
env: | |
COMMIT_SHA: ${{ github.sha }} | |
run: | | |
for f in $(find ./public/ -name *.js.map) ; do | |
curl -X POST "https://kibana-sourcemaps.aragon.org/api/apm/sourcemaps" \ | |
-H 'Content-Type: multipart/form-data' \ | |
-H 'kbn-xsrf: true' \ | |
-H 'Authorization: ApiKey ${{ secrets.APM_API_KEY }}' \ | |
-F service_name="client" \ | |
-F service_version="$COMMIT_SHA" \ | |
-F bundle_filepath="http://localhost/static/js/$(basename $f)" \ | |
-F sourcemap=@$f | |
done |