You've already forked hugo-extended
mirror of
https://github.com/jakejarvis/hugo-extended.git
synced 2026-06-24 10:25:57 -04:00
refactor: full typescript migration (#174)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
name: Publish to NPM
|
||||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
- "v*"
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
@@ -14,11 +14,20 @@ jobs:
|
||||
name: Publish to NPM
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: "24"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
- run: npm install -g npm@latest
|
||||
- run: npm ci
|
||||
- run: npm publish
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: "24"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
- name: Install dependencies
|
||||
run: npm install -g npm@latest && npm ci
|
||||
- name: Generate types
|
||||
run: npm run generate-types
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
- name: Type check
|
||||
run: npm run typecheck
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Publish
|
||||
run: npm publish
|
||||
|
||||
+51
-24
@@ -1,35 +1,62 @@
|
||||
name: Run tests
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
name: Test on ${{ matrix.os }} with Node ${{ matrix.node }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
node:
|
||||
- 24
|
||||
- 22
|
||||
- 20
|
||||
fail-fast: false
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: Node ${{ matrix.node }} on ${{ matrix.os }}
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
node: ["20", "22", "24"]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- run: npm ci
|
||||
- run: npm audit --omit=dev
|
||||
continue-on-error: true
|
||||
- run: npm run test
|
||||
- run: node lib/cli.js new site mysite
|
||||
- run: node lib/cli.js --source mysite/ --minify --enableGitInfo --logLevel info
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
cache: "npm"
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Generate types
|
||||
run: npm run generate-types
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
- name: Type check
|
||||
run: npm run typecheck
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Run unit tests
|
||||
run: npm run test:unit
|
||||
- name: Run integration tests
|
||||
run: npm run test:integration
|
||||
|
||||
# coverage:
|
||||
# name: Coverage
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v6
|
||||
# - uses: actions/setup-node@v6
|
||||
# with:
|
||||
# node-version: "24"
|
||||
# cache: "npm"
|
||||
# - name: Install dependencies
|
||||
# run: npm ci
|
||||
# - name: Generate types
|
||||
# run: npm run generate-types
|
||||
# - name: Build
|
||||
# run: npm run build
|
||||
# - name: Run tests with coverage
|
||||
# run: npm run test:coverage
|
||||
# - name: Upload coverage reports
|
||||
# uses: codecov/codecov-action@v5
|
||||
# with:
|
||||
# files: ./coverage/coverage-final.json
|
||||
# fail_ci_if_error: false
|
||||
|
||||
Reference in New Issue
Block a user