Convert to monorepo with Yarn 4 #171
Workflow file for this run
This file contains 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: CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
name: Test and lint ${{ matrix.packages }} on Node.js ${{ matrix.node }} and ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node: [20.x] | |
os: [ubuntu-latest, windows-latest] | |
packages: | |
[ | |
'cra-template-redux', | |
'cra-template-redux-typescript', | |
'expo-template-redux-typescript', | |
'react-native-template-redux-typescript', | |
'vite-template-redux', | |
] | |
steps: | |
- name: Checkout repository for ${{ matrix.packages }} on ${{ matrix.node }} and ${{ matrix.os }} | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: actions/checkout@v4 | |
- name: Checkout repository for ${{ matrix.packages }} on ${{ matrix.node }} and ${{ matrix.os }} | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: actions/checkout@v4 | |
- name: Setup Node.js ${{ matrix.node }} for ${{ matrix.packages }} on ${{ matrix.os }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Mock the templates for ${{ matrix.packages }} on ${{ matrix.node }} and ${{ matrix.os }} | |
run: npx tsx scripts/mockTemplates.mts ${{ matrix.packages }} | |
- name: Run test for ${{ matrix.packages }} on ${{ matrix.node }} and ${{ matrix.os }} | |
working-directory: example | |
run: npm run test | |
# - name: Run lint for ${{ matrix.packages }} on ${{ matrix.node }} and ${{ matrix.os }} | |
# working-directory: example | |
# run: npm run lint | |
- name: Set up JDK 17 for React Native build for ${{ matrix.packages }} on ${{ matrix.node }} and ${{ matrix.os }} | |
if: matrix.packages == 'react-native-template-redux-typescript' || matrix.packages == 'expo-template-redux-typescript' | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17.x' | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Build ${{ matrix.packages }} on ${{ matrix.node }} and ${{ matrix.os }} | |
working-directory: example | |
run: npm run build |