WFCD/warframe-nexus-query

View on GitHub
.github/workflows/ci.yaml

Summary

Maintainability
Test Coverage
name: CI
on:
  pull_request:
    branches:
      - master
      - main

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0
    - uses: actions/setup-node@v4
      with:
        node-version-file: '.nvmrc'
        cache: npm
    - run: npm ci
    - run: npm run lint
    - name: Run commitlint
      run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
  test:
    name: Test
    runs-on: ubuntu-latest
    needs: lint
    strategy:
      matrix:
        node-version: ['lts/hydrogen', 'lts/iron', 'lts/*']
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-node@v4
      with:
        node-version: ${{ matrix.node-version }}
        cache: npm
    - run: npm ci
    - run: npm test
      env:
        CI: true
        NEXUSHUB_USER_KEY: ${{ secrets.NEXUSHUB_USER_KEY }}
        NEXUSHUB_USER_SECRET: ${{ secrets.NEXUSHUB_USER_SECRET }}
  coverage:
    name: Coverage
    runs-on: ubuntu-latest
    needs: lint
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-node@v4
      with:
        node-version-file: '.nvmrc'
        cache: npm
    - run: npm install
    - run: npm test
      env:
        CI: true
        NEXUSHUB_USER_KEY: ${{ secrets.NEXUSHUB_USER_KEY }}
        NEXUSHUB_USER_SECRET: ${{ secrets.NEXUSHUB_USER_SECRET }}
    - name: Coveralls
      uses: coverallsapp/github-action@master
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}