| 1 | name: CI |
| 2 | on: |
| 3 | push: |
| 4 | branches: |
| 5 | - master |
| 6 | pull_request: |
| 7 | types: [opened, synchronize, reopened] |
| 8 | branches: |
| 9 | - master |
| 10 | jobs: |
| 11 | build: |
| 12 | runs-on: ubuntu-latest |
| 13 | strategy: |
| 14 | matrix: |
| 15 | node-version: [14.x] |
| 16 | steps: |
| 17 | - uses: actions/checkout@v2 |
| 18 | with: |
| 19 | fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis |
| 20 | - name: Use Node.js ${{ matrix.node-version }} |
| 21 | uses: actions/setup-node@v2 |
| 22 | with: |
| 23 | node-version: ${{ matrix.node-version }} |
| 24 | - name: npm install |
| 25 | run: npm ci |
| 26 | - name: npm run lint |
| 27 | run: npm run lint |
| 28 | continue-on-error: true |
| 29 | - name: npm run build |
| 30 | run: npm run build |
| 31 | - name: npm test |
| 32 | run: npm test |
| 33 | - name: npm run coverage |
| 34 | run: npm run coverage |
| 35 | - name: SonarCloud Scan |
| 36 | uses: SonarSource/sonarcloud-github-action@master |
| 37 | env: |
| 38 | GITHUB_TOKEN: ${{ secrets.USER_TOKEN }} # Needed to get PR information, if any |
| 39 | SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
| 40 | build-docker: |
| 41 | runs-on: ubuntu-latest |
| 42 | steps: |
| 43 | - uses: actions/checkout@v2 |
| 44 | - name: Set up Docker Buildx |
| 45 | id: buildx |
| 46 | uses: docker/setup-buildx-action@v1 |
| 47 | - name: Build docker image |
| 48 | run: | |
| 49 | cd docker |
| 50 | make SUBMODULES_INIT=false |