Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Run lint and test jobs in parallel #9611

Merged
merged 3 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Lint JavaScript

on:
workflow_dispatch:
workflow_call:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]

jobs:
lint:
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_dispatch' }}
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,18 @@ on:
branches: [main]

jobs:
lint:
uses: ./.github/workflows/lint.yml

test:
uses: ./.github/workflows/test.yml

confirmPassingBuild:
runs-on: ubuntu-latest
needs: [lint, test]
if: ${{ always() && (needs.lint.result == 'failure' || needs.test.result == 'failure') }}

steps:
- name: Run lint
id: lint
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
WORKFLOW: lint.yml
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

- name: Run tests
id: tests
uses: Expensify/App/.github/actions/triggerWorkflowAndWait@main
with:
WORKFLOW: test.yml
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}

# This Slack step is duplicated in all workflows, if you make a change to this step, make sure to update all
# the other workflows with the same change
- uses: 8398a7/action-slack@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Jest Unit Tests

on:
workflow_dispatch:
workflow_call:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]

jobs:
test:
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_dispatch' }}
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down