Skip to content

Bump markdownlint-cli from 0.41.0 to 0.42.0 #838

Bump markdownlint-cli from 0.41.0 to 0.42.0

Bump markdownlint-cli from 0.41.0 to 0.42.0 #838

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 3
- name: Cache node.js modules
uses: actions/cache@v4
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 8
- name: Install node.js dependencies
run: npm ci
- name: Run build script
env:
AZURE_SERVICE_BUS_MAX_CONCURRENT_CALLS: "${{ secrets.AZURE_SERVICE_BUS_MAX_CONCURRENT_CALLS }}"
DELETE_EXPIRED_TIMESERIES_CRON_EXPRESSION: "${{ secrets.DELETE_EXPIRED_TIMESERIES_CRON_EXPRESSION }}"
FFFS_WEB_PORTAL_BUILD_TYPE: "${{ secrets.FFFS_WEB_PORTAL_BUILD_TYPE }}"
run: |
npm run build
- name: Run markdown linting check
run: |
node_modules/.bin/markdownlint $PWD --ignore node_modules
# https://docs.codeclimate.com/docs/github-actions-test-coverage
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
- name: Set pull request GIT_BRANCH environment variable for code climate
if: github.event_name == 'pull_request'
run: echo "GIT_BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
- name: Set non-pull request GIT_BRANCH environment variable for code climate
if: github.event_name != 'pull_request'
run: echo "GIT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Set GITHUB_SHA environment variable for code climate
run: echo "GIT_COMMIT_SHA=$GITHUB_SHA" >> $GITHUB_ENV
- name: Set up code climate for test coverage reporting
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
# The test coverage files are in a nested location so create a symbolic link for the code climate test
# reporter to use.
ln -s testing/coverage coverage
- name: Run unit tests
env:
AZURE_SERVICE_BUS_MAX_CONCURRENT_CALLS: "${{ secrets.AZURE_SERVICE_BUS_MAX_CONCURRENT_CALLS }}"
DELETE_EXPIRED_TIMESERIES_HARD_LIMIT: "${{ secrets.DELETE_EXPIRED_TIMESERIES_HARD_LIMIT }}"
FFFS_WEB_PORTAL_STAGING_DB_ADMIN_PASSWORD: "${{ secrets.FFFS_WEB_PORTAL_STAGING_DB_ADMIN_PASSWORD }}"
FFFS_WEB_PORTAL_STAGING_DB_ADMIN_USERNAME: "${{ secrets.FFFS_WEB_PORTAL_STAGING_DB_ADMIN_USERNAME }}"
FFFS_WEB_PORTAL_STAGING_DB_CONNECTION_STRING: "${{ secrets.FFFS_WEB_PORTAL_STAGING_DB_CONNECTION_STRING }}"
FFFS_WEB_PORTAL_STAGING_DB_PASSWORD: "${{ secrets.FFFS_WEB_PORTAL_STAGING_DB_PASSWORD }}"
FFFS_WEB_PORTAL_STAGING_DB_REPORTING_PASSWORD: "${{ secrets.FFFS_WEB_PORTAL_STAGING_DB_REPORTING_PASSWORD }}"
FFFS_WEB_PORTAL_STAGING_DB_REPORTING_USERNAME: "${{ secrets.FFFS_WEB_PORTAL_STAGING_DB_REPORTING_USERNAME }}"
FFFS_WEB_PORTAL_STAGING_DB_USERNAME: "${{ secrets.FFFS_WEB_PORTAL_STAGING_DB_USERNAME }}"
MSSQL_SA_PASSWORD: "${{ secrets.MSSQL_SA_PASSWORD }}"
SQLDB_DATABASE: "${{ secrets.SQLDB_DATABASE }}"
SQLDB_PASSWORD: "${{ secrets.SQLDB_PASSWORD }}"
SQLDB_SERVER: "${{ secrets.SQLDB_SERVER }}"
SQLDB_USER: "${{ secrets.SQLDB_USER }}"
SQLTESTDB_HOST: "${{ secrets.SQLTESTDB_HOST }}"
SQLTESTDB_PORT: "${{ secrets.SQLTESTDB_PORT }}"
SQLDB_TRUST_SERVER_CERTIFICATE: "${{ secrets.SQLDB_TRUST_SERVER_CERTIFICATE }}"
run:
npm test
- name: Upload test coverage to code climate
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
./cc-test-reporter after-build -t lcov --exit-code $?