Skip to content

Commit

Permalink
Skip most PR checks on automated pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Jun 9, 2021
1 parent 22e586f commit 5627217
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 167 deletions.
70 changes: 35 additions & 35 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: CLA Assistant

on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]
issue_comment:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]

jobs:
CLA:
runs-on: ubuntu-latest
# This job only runs for pull request comments or pull request target events (not issue comments)
# It does not run for pull requests created by OSBotify
if: ${{ github.event.issue.pull_request || (github.event_name == 'pull_request_target' && github.event.pull_request.user.login != 'OSBotify') }}
steps:
- uses: actions-ecosystem/action-regex-match@9c35fe9ac1840239939c59e5db8839422eed8a73
id: sign
with:
text: ${{ github.event.comment.body }}
regex: '\s*I have read the CLA Document and I hereby sign the CLA\s*'
- uses: actions-ecosystem/action-regex-match@9c35fe9ac1840239939c59e5db8839422eed8a73
id: recheck
with:
text: ${{ github.event.comment.body }}
regex: '\s*recheck\s*'
- name: CLA Assistant
if: ${{ steps.recheck.outputs.match != '' || steps.sign.outputs.match != '' }} || github.event_name == 'pull_request_target'
# Version: 2.1.2-beta
uses: cla-assistant/github-action@948230deb0d44dd38957592f08c6bd934d96d0cf
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN : ${{ secrets.CLA_BOTIFY_TOKEN }}
with:
path-to-signatures: '${{ github.repository }}/cla.json'
path-to-document: 'https://github.com/${{ github.repository }}/blob/main/CLA.md'
branch: 'master'
remote-organization-name: 'Expensify'
remote-repository-name: 'CLA'
lock-pullrequest-aftermerge: false
allowlist: OSBotify,snyk-bot
CLA:
runs-on: ubuntu-latest
# This job only runs for pull request comments or pull request target events (not issue comments)
# It does not run for pull requests created by OSBotify
if: ${{ github.event.issue.pull_request || (github.event_name == 'pull_request_target' && github.event.pull_request.user.login != 'OSBotify') }}
steps:
- uses: actions-ecosystem/action-regex-match@9c35fe9ac1840239939c59e5db8839422eed8a73
id: sign
with:
text: ${{ github.event.comment.body }}
regex: '\s*I have read the CLA Document and I hereby sign the CLA\s*'
- uses: actions-ecosystem/action-regex-match@9c35fe9ac1840239939c59e5db8839422eed8a73
id: recheck
with:
text: ${{ github.event.comment.body }}
regex: '\s*recheck\s*'
- name: CLA Assistant
if: ${{ steps.recheck.outputs.match != '' || steps.sign.outputs.match != '' }} || github.event_name == 'pull_request_target'
# Version: 2.1.2-beta
uses: cla-assistant/github-action@948230deb0d44dd38957592f08c6bd934d96d0cf
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN : ${{ secrets.CLA_BOTIFY_TOKEN }}
with:
path-to-signatures: '${{ github.repository }}/cla.json'
path-to-document: 'https://github.com/${{ github.repository }}/blob/main/CLA.md'
branch: 'master'
remote-organization-name: 'Expensify'
remote-repository-name: 'CLA'
lock-pullrequest-aftermerge: false
allowlist: OSBotify,snyk-bot
91 changes: 46 additions & 45 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,53 @@
name: E2E iOS Tests

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

env:
DEVELOPER_DIR: /Applications/Xcode_12.3.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_12.3.app/Contents/Developer

jobs:
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.7'

- name: Install bundler
run: gem install bundler

- name: Install gems
run: bundle install

- name: Install node packages
uses: nick-invision/retry@7c68161adf97a48beb850a595b8784ec57a98cbb
with:
timeout_minutes: 10
max_attempts: 5
command: npm ci

- name: Install detox
run: npm install -g detox-cli

- name: Install cocoapods
uses: nick-invision/retry@7c68161adf97a48beb850a595b8784ec57a98cbb
with:
timeout_minutes: 15
max_attempts: 3
command: cd ios && pod install --repo-update

- name: Install brew depdencies
run: |
brew tap wix/brew
brew install applesimutils
- name: Build tests
run: detox build --configuration ios.sim.release

- name: Run tests
run: detox test --configuration ios.sim.release --cleanup --debug-synchronization 200 --loglevel trace
test:
if: github.actor != 'OSBotify'
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.7'

- name: Install bundler
run: gem install bundler

- name: Install gems
run: bundle install

- name: Install node packages
uses: nick-invision/retry@7c68161adf97a48beb850a595b8784ec57a98cbb
with:
timeout_minutes: 10
max_attempts: 5
command: npm ci

- name: Install detox
run: npm install -g detox-cli

- name: Install cocoapods
uses: nick-invision/retry@7c68161adf97a48beb850a595b8784ec57a98cbb
with:
timeout_minutes: 15
max_attempts: 3
command: cd ios && pod install --repo-update

- name: Install brew depdencies
run: |
brew tap wix/brew
brew install applesimutils
- name: Build tests
run: detox build --configuration ios.sim.release

- name: Run tests
run: detox test --configuration ios.sim.release --cleanup --debug-synchronization 200 --loglevel trace
53 changes: 27 additions & 26 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
name: Lint JavaScript

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

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
lint:
if: github.actor != 'OSBotify'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '14.x'

- name: Install node packages
uses: nick-invision/retry@7c68161adf97a48beb850a595b8784ec57a98cbb
with:
timeout_minutes: 10
max_attempts: 5
command: npm ci
- name: Install node packages
uses: nick-invision/retry@7c68161adf97a48beb850a595b8784ec57a98cbb
with:
timeout_minutes: 10
max_attempts: 5
command: npm ci

- run: npm run lint
env:
CI: true
- run: npm run lint
env:
CI: true
41 changes: 21 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
name: Jest Unit Tests

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

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
test:
if: github.actor != 'OSBotify'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'

- name: Install node packages
uses: nick-invision/retry@7c68161adf97a48beb850a595b8784ec57a98cbb
with:
timeout_minutes: 10
max_attempts: 5
command: npm ci
- name: Install node packages
uses: nick-invision/retry@7c68161adf97a48beb850a595b8784ec57a98cbb
with:
timeout_minutes: 10
max_attempts: 5
command: npm ci

- run: npm run test
env:
CI: true
- run: npm run test
env:
CI: true
47 changes: 24 additions & 23 deletions .github/workflows/validateGithubActions.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
name: Validate Github Actions

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

jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
verify:
if: github.actor != 'OSBotify'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'

- name: Install node packages
uses: nick-invision/retry@7c68161adf97a48beb850a595b8784ec57a98cbb
with:
timeout_minutes: 10
max_attempts: 5
command: npm ci
- name: Install node packages
uses: nick-invision/retry@7c68161adf97a48beb850a595b8784ec57a98cbb
with:
timeout_minutes: 10
max_attempts: 5
command: npm ci

# Rebuild all the actions on this branch and check for a diff. Fail if there is one,
# because that would be a sign that the PR author did not rebuild the Github Actions
- name: Verify Javascript Action Builds
run: ./.github/scripts/verifyActions.sh
# Rebuild all the actions on this branch and check for a diff. Fail if there is one,
# because that would be a sign that the PR author did not rebuild the Github Actions
- name: Verify Javascript Action Builds
run: ./.github/scripts/verifyActions.sh

- name: Validate actions and workflows
run: npm run gh-actions-validate
- name: Validate actions and workflows
run: npm run gh-actions-validate
37 changes: 19 additions & 18 deletions .github/workflows/verifyPodfile.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
name: Verify Podfile

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

jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
verify:
if: github.actor != 'OSBotify'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'

- name: Install node packages
uses: nick-invision/retry@7c68161adf97a48beb850a595b8784ec57a98cbb
with:
timeout_minutes: 10
max_attempts: 5
command: npm ci
- name: Install node packages
uses: nick-invision/retry@7c68161adf97a48beb850a595b8784ec57a98cbb
with:
timeout_minutes: 10
max_attempts: 5
command: npm ci

- run: ./.github/scripts/verifyPodfile.sh
- run: ./.github/scripts/verifyPodfile.sh

0 comments on commit 5627217

Please sign in to comment.