Skip to content

Bump SonarSource/sonarcloud-github-action from 9f9bba2c7aaf7a55eac26abbac906c3021d211b2 to 982992a35a56c6bebd7c76c65e5c3e4c18e634c8 #1574

Bump SonarSource/sonarcloud-github-action from 9f9bba2c7aaf7a55eac26abbac906c3021d211b2 to 982992a35a56c6bebd7c76c65e5c3e4c18e634c8

Bump SonarSource/sonarcloud-github-action from 9f9bba2c7aaf7a55eac26abbac906c3021d211b2 to 982992a35a56c6bebd7c76c65e5c3e4c18e634c8 #1574

Workflow file for this run

name: 2wp-api build
on: [push, pull_request]
permissions: read-all
jobs:
checkout-and-build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Setup NodeJS
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 18
cache: 'npm'
- name: Generate .env file
run: |
cp .env.test .env
- name: Build & test project
run: |
npm ci
npm run unit-test
npm run eslint
npm run only-coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@982992a35a56c6bebd7c76c65e5c3e4c18e634c8 # master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}