diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..00fc5c4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +# https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-nodejs + +name: ci +on: + push: + pull_request: + workflow_dispatch: + +jobs: + ci: + strategy: + fail-fast: false + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + node-version: [16.x, 18.x, 20.x, lts/*, latest] + runs-on: ${{ matrix.os }} + steps: + - if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y libxml2 libxml2-dev + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 # TODO: Remove these 3 lines. + with: + python-version: 3.11 + - run: touch package-lock.json # TODO: Remove this line. + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + - run: npm update # TODO: Remove this line. + # - run: npm ci + # - run: npm install + - run: npm install --build-from-source + - run: npm run build --if-present + - run: npm test