Configure yarn to use official npmjs registry #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Platform Test | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| reactjs: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [^18, ^20] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Configure yarn registry | |
| run: yarn config set registry https://registry.npmjs.org | |
| - name: Build casbin-core | |
| run: yarn install && yarn build && yarn link | |
| - name: Install and link React.js test | |
| run: cd test/reactjs && yarn config set registry https://registry.npmjs.org && 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: [^18, ^20] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Configure yarn registry | |
| run: yarn config set registry https://registry.npmjs.org | |
| - name: Build casbin-core | |
| run: yarn install && yarn build && yarn link | |
| - name: Install React Native test dependencies | |
| run: cd test/reactnative && yarn config set registry https://registry.npmjs.org && 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: [^18, ^20] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Configure yarn registry | |
| run: yarn config set registry https://registry.npmjs.org | |
| - 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 config set registry https://registry.npmjs.org && 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 |