Skip to content

Commit

Permalink
test matrix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rhit-villencr committed Sep 28, 2024
1 parent fcec884 commit c60b130
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 27 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/expo-doctor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Expo Doctor

jobs:
run-workflows:
runs-on: ubuntu-latest
steps:
- name: Run Expo Doctor
run: npx expo-doctor@latest
13 changes: 13 additions & 0 deletions .github/workflows/list-ts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Linting

jobs:
run-workflows:
runs-on: ubuntu-latest
steps:
# Run the TypeScript Lint workflow
- name: Run TypeScript Lint
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
eslint_flags: ". --ext .js,.jsx,.ts,.tsx"\
40 changes: 13 additions & 27 deletions .github/workflows/parent-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,20 @@
name: Run All Workflows

on: [push, pull_request]
on:
push:
branches:
- main
workflow_dispatch:

jobs:
run-workflows:
runs-on: ubuntu-latest
strategy:
matrix:
workflow: [expo-doctor.yml, lint-ts.yml, type-check.yml]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install

# Run the Expo Doctor workflow
- name: Run Expo Doctor
run: npx expo-doctor@latest

# Run the TypeScript Lint workflow
- name: Run TypeScript Lint
uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
eslint_flags: ". --ext .js,.jsx,.ts,.tsx"

# Run the Type Check workflow
- name: Run Type Check
run: npm run tsc --noEmit
- name: Checkout repository
uses: actions/checkout@v3

- name: Run ${{ matrix.workflow }}
uses: ${{ matrix.workflow }}
9 changes: 9 additions & 0 deletions .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Type Check

jobs:
run-workflows:
runs-on: ubuntu-latest
steps:
# Run the Type Check workflow
- name: Run Type Check
run: npm run tsc --noEmit

0 comments on commit c60b130

Please sign in to comment.