Skip to content

github pages site

github pages site #12

Workflow file for this run

name: Package Tests
on: [push, pull_request]
jobs:
npm:
name: "@wq/${{ matrix.package }}"
runs-on: ubuntu-latest
env:
PACKAGE: ${{ matrix.package }}
strategy:
fail-fast: false
matrix:
python-version: ["3.14"]
node-version: [24]
package:
- form-common
- form
- form-web
- form-native
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: npm ci --no-optional && npm run build
- name: Install native dependencies
if: matrix.package == 'form-native'
run: |
cd packages/$PACKAGE
echo "@wq:registry=https://npm.pkg.github.com/wq" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
- name: Lint with ESLint
run: npm run lint
- name: Start test server
run: python -m tests.server &
- name: Test with Jest
run: |
cd packages/$PACKAGE
npm run test
- uses: actions/delete-package-versions@v5
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
package-type: npm
package-name: ${{ matrix.package }}
min-versions-to-keep: 5
- name: Publish to Github Packages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
python -m pip install setuptools_scm
./set_dev_version.sh
echo "registry=https://npm.pkg.github.com/wq" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
cp .npmrc packages/$PACKAGE/.npmrc # for native builds
cd packages/$PACKAGE
npm publish --tag latest