Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b76f344 authored by Simon Chan's avatar Simon Chan
Browse files

chore(ci): use separate workflow for pr

parent 68f23e76
Loading
Loading
Loading
Loading
+5 −17
Original line number Diff line number Diff line
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI
name: Deploy

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

env:
  BASE_PATH: /ya-webadb
@@ -16,33 +14,23 @@ jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [16.x, 18.x]

    steps:
      - name: Checkout
        uses: actions/checkout@v3.0.2
        with:
          fetch-depth: 0

      - name: Use Node.js ${{ matrix.node-version }}
      - name: Use Node.js 16.x
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}
          node-version: 16.x

      - run: node common/scripts/install-run-rush.js install
      - run: node common/scripts/install-run-rush.js change -v

      - run: node common/scripts/install-run-rush.js build --verbose

      - run: npx next export
        working-directory: ./apps/demo

      # - run: node common/scripts/install-run-rush.js test

      # - run: bash <(curl -s https://codecov.io/bash) -f libraries/struct/coverage/lcov.info -F struct

      - run: touch apps/demo/out/.nojekyll

      - name: Deploy
        uses: s0/git-publish-subdir-action@develop
        env:
+35 −0
Original line number Diff line number Diff line
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Pull Request

on:
  pull_request:
    branches: [master]

env:
  BASE_PATH: /ya-webadb

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [16.x, 18.x]

    steps:
      - name: Checkout
        uses: actions/checkout@v3.0.2
        with:
          fetch-depth: 0

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}

      - run: node common/scripts/install-run-rush.js change -v

      - run: node common/scripts/install-run-rush.js install
      - run: node common/scripts/install-run-rush.js build --verbose
+31 −0
Original line number Diff line number Diff line
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Test

on:
  push:
    branches: [master]

env:
  BASE_PATH: /ya-webadb

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [16.x, 18.x]

    steps:
      - name: Checkout
        uses: actions/checkout@v3.0.2

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}

      - run: node common/scripts/install-run-rush.js install
      - run: node common/scripts/install-run-rush.js build --verbose