Skip to content

Created site reporter #8

Created site reporter

Created site reporter #8

Workflow file for this run

name: Test scripts
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
name: Tests
defaults:
run:
working-directory: ./log
permissions:
contents: read
actions: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 22
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Use cached node_modules
uses: actions/cache@v4
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- run: npm run build
- run: node dist
env:
SOURCES: |
GitHub->https://github.com
Facebook->https://facebook.com
GITHUB_TOKEN: ${{ github.token }}
- uses: actions/upload-artifact@v4
with:
name: report
path: ./log/report.json
if-no-files-found: error
retention-days: 5
overwrite: true