From 59ba6adc8bdf5c503f1c6d1242a6936199c33c9f Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Fri, 20 Sep 2024 13:35:44 -0700 Subject: [PATCH] test: Introduce XS CI workflow --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b82bfcef1d..212526d1b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -260,3 +260,49 @@ jobs: # when imported in an NPM node_modules tree. - name: Prepack packages run: yarn lerna run --reject-cycles --concurrency 1 prepack + + test-xs: + name: test-xs + + # begin macro + + runs-on: ${{ matrix.platform }} + strategy: + fail-fast: false + matrix: + node-version: [20.x] + xs-version: [5.0.0] + platform: [ubuntu-latest] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + # without this, setup-node errors on mismatched yarn versions + - run: corepack enable + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: yarn + + - name: Install dependencies + run: yarn install --immutable + + # end macro + + - name: Clone XS + run: git clone https://github.com/moddable-OpenSource/moddable --branch "${{ matrix.xs-version }}" --depth 1 + + - name: Build XS + working-directory: moddable/build/makefiles/lin + env: + MODDABLE: ${{ env.GITHUB_WORKSPACE }}/moddable + run: make + + - name: Run yarn build + run: yarn build + + - name: Run XS tests + run: yarn lerna run test:xs