Adaptive Lighting tweaks #2109
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: Verify | |
on: | |
push: | |
branches: | |
- master | |
- main | |
- 'releases?/**' | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+* | |
pull_request: | |
types: [opened, assigned, synchronize, reopened] | |
jobs: | |
build: | |
name: Verify | |
runs-on: ubuntu-latest | |
env: | |
node-version-analysis: 22.x | |
strategy: | |
matrix: | |
# the Node.js versions to build on | |
node-version: [18.x, 20.x, 22.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
env: | |
CI: true | |
- name: Test | |
run: npm run test | |
- name: Export PR info | |
if: github.event_name == 'pull_request' && matrix.node-version == env.node-version-analysis | |
run: | | |
echo number=${{ github.event.number }} > pr_data.txt | |
echo head_ref=${{ github.head_ref }} >> pr_data.txt | |
echo head_sha=${{ github.sha }} >> pr_data.txt | |
echo base_ref=${{ github.base_ref }} >> pr_data.txt | |
- name: Archive reports and info (for PR) | |
if: github.event_name == 'pull_request' && matrix.node-version == env.node-version-analysis | |
uses: actions/upload-artifact@v4 | |
with: | |
name: reports | |
retention-days: 7 | |
path: | | |
pr_data.txt | |
coverage/lcov.info | |
coverage/clover.xml | |
reports/tests.xml | |
reports/junit.xml | |
- name: SonarCloud (on push) | |
uses: sonarsource/sonarcloud-github-action@v2 | |
if: github.event_name == 'push' && matrix.node-version == env.node-version-analysis | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Code Coverage (on push) | |
uses: codecov/codecov-action@v4 | |
if: github.event_name == 'push' && matrix.node-version == env.node-version-analysis | |
with: | |
files: ./coverage/clover.xml | |
flags: tests | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Codecov Test Results (on push) | |
uses: codecov/test-results-action@v1 | |
if: github.event_name == 'push' && matrix.node-version == env.node-version-analysis | |
with: | |
files: ./reports/junit.xml | |
flags: tests | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} |