Skip to content

Commit

Permalink
fix: enable payments in staging and fix test deployment (Greenstand#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmcharlton authored Mar 13, 2022
1 parent 0ea2326 commit 0f649a2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions .env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ REACT_APP_REPORTING_API_ROOT=https://prod-k8s.treetracker.org/reporting
REACT_APP_EARNINGS_API_ROOT=https://prod-k8s.treetracker.org/earnings
REACT_APP_ENABLE_CAPTURE_MATCHING=true
REACT_APP_ENABLE_EARNINGS=true
REACT_APP_ENABLE_PAYMENTS=true
3 changes: 1 addition & 2 deletions .github/workflows/treetracker-admin-client-deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: npm ci
working-directory: ${{ env.project-directory }}
- name: build client project
run: CI= REACT_APP_WEBMAP_DOMAIN=http://test.treetracker.org REACT_APP_API_ROOT=https://test-k8s.treetracker.org/api/admin npm run build
run: CI= npm run build:test
working-directory: ${{ env.project-directory }}
- uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -62,4 +62,3 @@ jobs:
- name: Invalidate cloudfront caches
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.TEST_CDN_DISTRIBUTION_ID }} --paths "/*"
7 changes: 2 additions & 5 deletions .github/workflows/treetracker-staging-cdn-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.git-tag }}
- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: '14.x'
node-version: '16.x'
- name: npm clean install
run: npm ci
working-directory: ${{ env.project-directory }}
- name: run ESLint
run: npm run lint
working-directory: ${{ env.project-directory }}
# define the endpoints for PROD in github secrets
- name: build frontend project
run: npm run build:staging
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"start:local": "env-cmd -f .env.local cross-env PORT=3001 react-scripts start",
"build": "react-scripts build",
"build:dev": "env-cmd -f .env.development npm run build && mv build build-dev",
"build:test": "env-cmd -f .env.test npm run build",
"build:staging": "env-cmd -f .env.staging npm run build",
"test": "react-scripts test --env=jsdom --setupTestFrameworkScriptFile=./src/testSetup.js",
"test:debug": "react-scripts --inspect-brk test --runInBand --no-cache",
Expand Down
4 changes: 2 additions & 2 deletions src/context/AppContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ function getRoutes(user) {
},
],
disabled:
process.env.REACT_APP_ENABLE_EARNINGS !== 'true' ||
process.env.REACT_APP_ENABLE_PAYMENTS !== 'true' ||
(process.env.REACT_APP_ENABLE_EARNINGS !== 'true' &&
process.env.REACT_APP_ENABLE_PAYMENTS !== 'true') ||
!hasPermission(user, [
POLICIES.SUPER_PERMISSION,
POLICIES.MANAGE_EARNINGS,
Expand Down

0 comments on commit 0f649a2

Please sign in to comment.