Skip to content

feat: fix and update CI scripts #45

feat: fix and update CI scripts

feat: fix and update CI scripts #45

Workflow file for this run

name: Platform Test
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
jobs:
reactjs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [^20]
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Build casbin-core
run: yarn install && yarn build && yarn link
- name: Install and link React.js test
run: cd test/reactjs && yarn install && yarn link casbin-core
- name: Run React.js test
run: cd test/reactjs && yarn test
- name: Build React.js test
run: cd test/reactjs && yarn build
reactnative:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [^20]
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Build casbin-core
run: yarn install && yarn build && yarn link
- name: Install React Native test dependencies
run: cd test/reactnative && yarn install && yarn global add jest
- name: Run React Native test
run: cd test/reactnative && yarn test
angular:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [^20]
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Build casbin-core
run: yarn install && yarn build && yarn link
- name: Install Angular CLI
run: yarn global add @angular/cli
- name: Install and link Angular test
run: cd test/angular && yarn install && yarn link casbin-core
- name: Run Angular test
run: cd test/angular && ng test --watch=false --browsers=ChromeHeadless
- name: Build Angular test
run: cd test/angular && yarn build