[Snyk] Fix for 11 vulnerabilities #1611
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: Test build on Ubuntu | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v2 | |
- name: Caching node modules | |
uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-treemapper-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-treemapper- | |
- name: Upgrade npm to latest version | |
run: sudo npm i -g npm@latest | |
- name: Install react-native CLI | |
run: "sudo npm install -g react-native-cli" | |
- name: Install npm dependencies | |
run: npm install --legacy-peer-deps | |
- name: Linting | |
run: npm run lint:errors | |
- name: Setting Environment Variables | |
env: | |
MAPBOXGL_ACCCESS_TOKEN: ${{ secrets.MAPBOXGL_ACCCESS_TOKEN }} | |
BUGSNAP_CLIENT_KEY: ${{ secrets.BUGSNAP_CLIENT_KEY }} | |
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }} | |
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }} | |
API_ENDPOINT: ${{ secrets.API_ENDPOINT }} | |
CDN_URL: ${{ secrets.CDN_URL }} | |
WEB_APP_URL: ${{ secrets.WEB_APP_URL }} | |
run: | | |
echo "MAPBOXGL_ACCCESS_TOKEN=$MAPBOXGL_ACCCESS_TOKEN" >> .env | |
echo "BUGSNAP_CLIENT_KEY=$BUGSNAP_CLIENT_KEY" >> .env | |
echo "AUTH0_DOMAIN=$AUTH0_DOMAIN" >> .env | |
echo "AUTH0_CLIENT_ID=$AUTH0_CLIENT_ID" >> .env | |
echo "API_ENDPOINT=$API_ENDPOINT" >> .env | |
echo "CDN_URL=$CDN_URL" >> .env | |
echo "WEB_APP_URL=$WEB_APP_URL" >> .env | |
- name: Build Android app | |
run: | | |
react-native bundle \ | |
--platform android \ | |
--dev false \ | |
--entry-file index.js \ | |
--bundle-output android-release.bundle \ | |
--sourcemap-output android-release.bundle.map | |
- name: Build iOS app | |
run: | | |
react-native bundle \ | |
--platform ios \ | |
--dev false \ | |
--entry-file index.js \ | |
--bundle-output ios-release.bundle \ | |
--sourcemap-output ios-release.bundle.map |