Merge pull request #85 from symblai/SRE-2116-Fix-url-for-internet-con… #334
Workflow file for this run
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: Validate build | |
on: push | |
env: | |
APP_ID: '${{ secrets.APP_ID }}' | |
APP_SECRET: '${{ secrets.APP_SECRET }}' | |
EXPIRED_ACCESS_TOKEN: '${{ secrets.EXPIRED_ACCESS_TOKEN }}' | |
jobs: | |
validate_build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x] | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Dependencies | |
run: npm install | |
- name: Run ESLint | |
run: npm run lint | |
- name: Authenticate with Symbl | |
id: accessTokenRequest | |
uses: fjogeleit/http-request-action@v1 | |
with: | |
url: 'https://api.symbl.ai/oauth2/token:generate' | |
method: 'POST' | |
data: '{"type":"application","appId":"${{ secrets.APP_ID }}","appSecret":"${{ secrets.APP_SECRET }}"}' | |
- name: Parse Access Token | |
id: accessTokenParsed | |
uses: sergeysova/jq-action@v2 | |
with: | |
cmd: "jq '.accessToken' <<< '${{ steps.accessTokenRequest.outputs.response }}'" | |
- name: Push to ENV | |
run: echo "ACCESS_TOKEN=${{ steps.accessTokenParsed.outputs.value }}" >> $GITHUB_ENV | |
- name: Run tests | |
run: npm run test --coverage | |
# - name: SonarCloud Scan | |
# uses: SonarSource/sonarcloud-github-action@master | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} |