Skip to content

bot: expose comments on options to documentation and typescript types #153

bot: expose comments on options to documentation and typescript types

bot: expose comments on options to documentation and typescript types #153

Workflow file for this run

# Workflow for linting, building, testing, CodeQL analysis, and reporting of code coverage
name: Node.js CI
on:
push:
branches: [master]
paths:
- 'src/**'
- 'tests/**'
- 'package.json'
- 'package-lock.json'
- '.github/workflows/ci-push.yml'
schedule:
- cron: '0 12 * * 0'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 16.x
uses: actions/setup-node@v4
with:
node-version: 16
- run: npm ci
- run: npm run lint
- run: npm run build
- uses: actions/upload-artifact@v4
with:
name: build
path: build
- name: Test usage with TypeScript
run: npm run test:ts
env:
AUTH_JSON: ${{secrets.AUTH_JSON}}
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 16.x, 18.x]
needs: build
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Setup MediaWiki instance using Docker for integration tests
run: npm run setuplocalwiki
- run: npm ci
- uses: actions/download-artifact@v4
- run: npm run test
env:
AUTH_JSON: ${{secrets.AUTH_JSON}}
- uses: actions/upload-artifact@v4
with:
name: coverage_${{ matrix.node-version }}
path: coverage
coveralls:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: coverage_18.x
path: coverage
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# Upload coverage report to toolforge as well
upload_coverage:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/download-artifact@v4
with:
name: coverage_18.x
path: coverage
- name: Zip coverage report
run: |
mv coverage/lcov-report/* coverage
zip -r coverage.zip coverage
- name: Upload coverage reports to Toolforge
uses: garygrossgarten/github-action-scp@8a27854bb4f124a497a67316e83783efda770119
with:
local: /home/runner/work/mwn/mwn/coverage.zip
remote: /data/project/mwn/coverage.zip
host: login.toolforge.org
username: ${{ secrets.TOOLFORGE_USERNAME }}
privateKey: ${{ secrets.TOOLFORGE_PRIVATE_KEY }}
rmRemote: true
- name: Coverage
uses: garygrossgarten/github-action-ssh@915e492551885a89131e21d85f2e043c96abff80
with:
command: |
cd /data/project/mwn
rm -rf www/static/coverage
unzip coverage.zip -d www/static
host: login.toolforge.org
username: ${{ secrets.TOOLFORGE_USERNAME }}
privateKey: ${{ secrets.TOOLFORGE_PRIVATE_KEY }}