Skip to content

Commit

Permalink
feat:
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoMSousa committed Nov 22, 2022
1 parent 3c8364c commit 968a393
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,27 @@ jobs:
REACT_APP_META_TX_API_KEY: ${{ secrets.REACT_APP_META_TX_API_KEY_PRODUCTION }}
REACT_APP_META_TX_API_IDS: ${{ secrets.REACT_APP_META_TX_API_IDS_PRODUCTION }}

lighthouse_pr:
uses: bosonprotocol/interface/.github/workflows/lighthouse_pr.yaml@main
if: github.event_name == 'pull_request'
with:
REACT_APP_ENV_NAME: "testing"
DEPLOY_TO_FLEEK: false
ENV_NAME: "testing"
UPDATE_COVERAGE: false
REACT_APP_ENABLE_CURATION_LISTS: false
REACT_APP_CREATE_PROFILE_CONFIGURATION: "LENS"
REACT_APP_IPFS_GATEWAY: "https://bosonprotocol.infura-ipfs.io/ipfs/"
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
REACT_APP_RNFT_LICENSE_TEMPLATE: ${{ secrets.REACT_APP_RNFT_LICENSE_TEMPLATE_TESTING }}
REACT_APP_BUYER_SELLER_AGREEMENT_TEMPLATE: ${{ secrets.REACT_APP_BUYER_SELLER_AGREEMENT_TEMPLATE_TESTING }}
REACT_APP_DEFAULT_DISPUTE_RESOLVER_ID: ${{ secrets.REACT_APP_DEFAULT_DISPUTE_RESOLVER_ID_TESTING }}
REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS: ${{ secrets.REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS_TESTING }}
REACT_APP_META_TX_API_KEY: ${{ secrets.REACT_APP_META_TX_API_KEY_TESTING }}
REACT_APP_META_TX_API_IDS: ${{ secrets.REACT_APP_META_TX_API_IDS_TESTING }}

job-summary:
name: Create Job Summary
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lighthouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: logs 1
run: echo "Env name is ${{ inputs.REACT_APP_ENV_NAME }}"
- name: logs 2
run: echo "Env name is ${{ inputs.ENV_NAME }}"
run: echo "Env name is ${{ github.ENV_NAME }}"
- name: logs 3
run: echo "npm token is ${{ secrets.NPM_TOKEN }}"
- name: logs 4
Expand Down
122 changes: 122 additions & 0 deletions .github/workflows/lighthouse_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Run lighthouse on PR

on:
workflow_call:
inputs:
REACT_APP_ENV_NAME:
required: true
type: string
DEPLOY_TO_FLEEK:
required: true
type: boolean
UPDATE_COVERAGE:
required: true
type: boolean
ENV_NAME:
required: true
type: string
REACT_APP_ENABLE_CURATION_LISTS:
required: true
type: boolean
REACT_APP_SELLER_CURATION_LIST:
required: false
type: string
REACT_APP_OFFER_CURATION_LIST:
required: false
type: string
REACT_APP_CREATE_PROFILE_CONFIGURATION:
required: true
type: string
REACT_APP_IPFS_GATEWAY:
required: true
type: string
secrets:
NPM_TOKEN:
required: true
FLEEK_API_KEY:
required: false
CODECOV_TOKEN:
required: true
REACT_APP_INFURA_IPFS_PROJECT_ID:
required: false
REACT_APP_INFURA_IPFS_PROJECT_SECRET:
required: false
REACT_APP_DEFAULT_TOKENS_LIST_TESTING:
required: false
REACT_APP_DEFAULT_TOKENS_LIST_STAGING:
required: false
REACT_APP_DEFAULT_TOKENS_LIST_PRODUCTION:
required: false
REACT_APP_RNFT_LICENSE_TEMPLATE:
required: true
REACT_APP_BUYER_SELLER_AGREEMENT_TEMPLATE:
required: true
REACT_APP_DEFAULT_DISPUTE_RESOLVER_ID:
required: true
REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS:
required: true
REACT_APP_GOOGLE_TAG_ID:
required: false
REACT_APP_META_TX_API_KEY:
required: true
REACT_APP_META_TX_API_IDS:
required: true
REACT_APP_ELIGIBLE_SELLER_WALLET_ADDRESSES:
required: false
outputs:
JOB_LINT:
value: ${{ jobs.build-test-deploy.outputs.jobLint }}
JOB_BUILD:
value: ${{ jobs.build-test-deploy.outputs.jobBuild }}
JOB_COVERAGE:
value: ${{ jobs.build-test-deploy.outputs.jobCoverage }}
DEPLOY_URL:
value: ${{ jobs.build-test-deploy.outputs.deployUrl }}

jobs:
build-test-deploy:
name: Build, Test and Deploy the Marketplace Interface
runs-on: ubuntu-latest
env:
REACT_APP_ENV_NAME: ${{ inputs.REACT_APP_ENV_NAME }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
REACT_APP_ENABLE_CURATION_LISTS: ${{ inputs.REACT_APP_ENABLE_CURATION_LISTS }}
REACT_APP_SELLER_CURATION_LIST: ${{ inputs.REACT_APP_SELLER_CURATION_LIST }}
REACT_APP_OFFER_CURATION_LIST: ${{ inputs.REACT_APP_OFFER_CURATION_LIST }}
REACT_APP_IPFS_GATEWAY: ${{ inputs.REACT_APP_IPFS_GATEWAY }}
REACT_APP_RNFT_LICENSE_TEMPLATE: ${{ secrets.REACT_APP_RNFT_LICENSE_TEMPLATE }}
REACT_APP_BUYER_SELLER_AGREEMENT_TEMPLATE: ${{ secrets.REACT_APP_BUYER_SELLER_AGREEMENT_TEMPLATE }}
REACT_APP_DEFAULT_DISPUTE_RESOLVER_ID: ${{ secrets.REACT_APP_DEFAULT_DISPUTE_RESOLVER_ID }}
REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS: ${{ secrets.REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS }}
REACT_APP_INFURA_IPFS_PROJECT_ID: ${{ secrets.REACT_APP_INFURA_IPFS_PROJECT_ID }}
REACT_APP_INFURA_IPFS_PROJECT_SECRET: ${{ secrets.REACT_APP_INFURA_IPFS_PROJECT_SECRET }}
REACT_APP_DEFAULT_TOKENS_LIST_TESTING: ${{ secrets.REACT_APP_DEFAULT_TOKENS_LIST_TESTING }}
REACT_APP_DEFAULT_TOKENS_LIST_STAGING: ${{ secrets.REACT_APP_DEFAULT_TOKENS_LIST_STAGING }}
REACT_APP_CREATE_PROFILE_CONFIGURATION: ${{ inputs.REACT_APP_CREATE_PROFILE_CONFIGURATION }}
REACT_APP_DEFAULT_TOKENS_LIST_PRODUCTION: ${{ secrets.REACT_APP_DEFAULT_TOKENS_LIST_PRODUCTION }}
REACT_APP_GOOGLE_TAG_ID: ${{ secrets.REACT_APP_GOOGLE_TAG_ID }}
REACT_APP_META_TX_API_KEY: ${{ secrets.REACT_APP_META_TX_API_KEY }}
REACT_APP_META_TX_API_IDS: ${{ secrets.REACT_APP_META_TX_API_IDS }}
REACT_APP_ELIGIBLE_SELLER_WALLET_ADDRESSES: ${{ secrets.REACT_APP_ELIGIBLE_SELLER_WALLET_ADDRESSES }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-node@v3
with:
token: ${{ secrets.NPM_TOKEN }}
node-version: "16.16.0"
registry-url: "https://registry.npmjs.org"
cache: "npm"
- name: Install lhci
run: npm install --location=global @lhci/[email protected]
- name: logs 1
run: echo "Env name is ${{ inputs.REACT_APP_ENV_NAME }}"
- name: logs 2
run: echo "Env name is ${{ github.ENV_NAME }}"
- name: logs 3
run: echo "npm token is ${{ secrets.NPM_TOKEN }}"
- name: logs 4
run: echo "GITHUB_TOKEN ${{ secrets.GITHUB_TOKEN }}"
- name: Lauch lhci
run: lhci autorun

0 comments on commit 968a393

Please sign in to comment.