diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ce8ac08..611b452 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,25 +11,21 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Checkout xslt30-test - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: repository: w3c/xslt30-test path: xslt30-test - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: - node-version: '20' cache: 'npm' - name: Install dependencies run: npm ci - - name: Compile preprocessors - run: npm run build-preprocessors - - name: Run tests run: npm test diff --git a/package.json b/package.json index c15ed48..acfa51b 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,10 @@ }, "scripts": { "build": "tsc && chmod +x dist/cli.js", - "build-preprocessors": "npm run build && rm src/preprocess/*js && bash -c \"for n in src/preprocess/*xsl ; do xjslt compile --standalone \\$n \\${n/xsl/js} ; done\" && prettier -w src/preprocess/ && npm run build", + "prebuild-preprocessors": "npm run build && rm src/preprocess/*js", + "build-preprocessors": "bash -c \"for n in src/preprocess/*xsl ; do npm exec -- xjslt compile --standalone \\$n \\${n/xsl/js} ; done\"", + "postbuild-preprocessors": "prettier -w src/preprocess/ && npm run build", + "pretest": "if [ -d xslt30-test ] ; then cd xslt30-test && git pull && cd .. ; else git clone --depth 1 https://github.com/w3c/xslt30-test/ ; fi", "test": "jest --coverage --verbose", "check": "jest && prettier -c src/ test/", "prepare": "tsc && chmod +x dist/cli.js"