Add react native directory #636
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: frontend | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
branches: | |
- main | |
- master | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
outputs: | |
backend: ${{ steps.filter.outputs.backend }} | |
frontend: ${{ steps.filter.outputs.frontend }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
backend: | |
- 'backend/**' | |
- '.github/workflows/**' | |
frontend: | |
- 'frontend/**' | |
- '.github/workflows/**' | |
test-app: | |
name: Test app | |
needs: changes | |
if: ${{ needs.changes.outputs.frontend == 'true' }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 7 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 14 | |
cache: npm | |
cache-dependency-path: frontend/package-lock.json | |
- run: npm install -g npm@7.0.0 | |
- run: npm install | |
working-directory: ./frontend | |
- run: npm run test | |
working-directory: ./frontend | |
node-next-test: | |
strategy: | |
matrix: | |
node_version: ['16', '18', '20'] | |
needs: changes | |
if: ${{ needs.changes.outputs.frontend == 'true' }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 7 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- run: npm install -g npm@7.0.0 | |
- run: npm install | |
working-directory: ./frontend | |
- run: npm run test | |
working-directory: ./frontend |