Skip to content

fix-and-core

fix-and-core #1058

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/setup-node@v1
with:
node-version: '18.12.1'
always-auth: true
token: ${{secrets.ACCESS_TOKEN}}
registry-url: 'https://npm.pkg.github.com'
scope: '@openforis'
env:
ACCESS_TOKEN: $${{secrets.ACCESS_TOKEN}}
- name: Install
run: yarn
env:
NODE_AUTH_TOKEN: ${{secrets.ACCESS_TOKEN}}
- name: Prepare Sentry Android
run: |
cd android && touch sentry.properties
echo auth.token=${{secrets.SENTRY_AUTH_TOKEN}} >> sentry.properties
echo defaults.org=fao-arenamobile >> sentry.properties
echo defaults.project=react-native >> sentry.properties
echo defaults.url=https://sentry.io/ >> sentry.properties
cat sentry.properties
- name: Prepare Sentry Ios
run: |
cd ios && touch sentry.properties
echo auth.token=${{secrets.SENTRY_AUTH_TOKEN}} >> sentry.properties
echo defaults.org=fao-arenamobile >> sentry.properties
echo defaults.project=react-native >> sentry.properties
echo defaults.url=https://sentry.io/ >> sentry.properties
cat sentry.properties
- name: Run Tests
run: yarn test
env:
TEST_PASSWORD: 'TEST_PASSWORD'
SEGMENT_API_KEY: 'SEGMENT_API_KEY'
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}