Skip to content

Trusted publishing, update CI #136

Trusted publishing, update CI

Trusted publishing, update CI #136

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: wa-sqlite CI
on:
push:
branches: ['master']
pull_request:
branches: ['master']
env:
EM_VERSION: 4.0.9
EM_CACHE_FOLDER: 'emsdk-cache'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v5
- name: Enable Corepack
run: corepack enable
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- uses: browser-actions/setup-chrome@v1
id: setup-chrome
with:
chrome-version: 129
- run: |
${{ steps.setup-chrome.outputs.chrome-path }} --version
- run: yarn install
- name: Test with checked-in WASM files
run: yarn test
# Install EMSDK
- name: Setup Emscripten
id: cache-system-libraries
uses: actions/cache@v4
with:
path: ${{env.EM_CACHE_FOLDER}}
key: ${{env.EM_VERSION}}-${{ runner.os }}
- uses: mymindstorm/setup-emsdk@v14
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
- run: emcc -v
# For some reason the Makefile fails to execute this with a "Permission denied"
# error on Github actions. Doing this here prevents the error.
- name: Download PowerSync Core
run: node scripts/download-core-build.js
- name: Test WASM build
run: |
make clean && make
yarn test