Skip to content

Add package metadata files and get tests running (#1) #3

Add package metadata files and get tests running (#1)

Add package metadata files and get tests running (#1) #3

Workflow file for this run

name: CI
defaults:
run: {shell: bash}
env:
PROTOC_VERSION: 3.x
on:
push:
branches: [main, feature.*]
tags: ['**']
pull_request:
jobs:
static_analysis:
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
check-latest: true
- run: npm install
- run: npm run check
tests:
name: 'Tests | Node ${{ matrix.node-version }} | ${{ matrix.os }}'
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, macos, windows]
node-version: ['lts/*', 'lts/-1', 'lts/-2']
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- run: npm install
- run: npm run test
deploy:
name: Deploy
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/') && github.repository == 'sass/sync-process'"
needs: [static_analysis, tests]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
check-latest: true
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish
env:
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
typedoc:
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/') && github.repository == 'sass/sync-process'"
needs: [deploy]
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
check-latest: true
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run doc
- name: Upload static files as artifact
uses: actions/upload-pages-artifact@v3
with: {path: docs}
- id: deployment
uses: actions/deploy-pages@v4