Skip to content

Commit

Permalink
fix: split tests and approval
Browse files Browse the repository at this point in the history
  • Loading branch information
tianhaoz95 committed Nov 5, 2021
1 parent 30dd7cf commit e1f4f4c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Expand Up @@ -36,5 +36,5 @@
],
"postCreateCommand": "ruby --version",
"remoteUser": "vscode",
"postStartCommand": "bundle install && npm install && git config --global user.email \"${localEnv:VSCODE_CONTAINER_GIT_EMAIL}\" && git config --global user.name \"${localEnv:VSCODE_CONTAINER_GIT_USER}\""
"postStartCommand": "bundle install && npm ci"
}
12 changes: 12 additions & 0 deletions .github/workflows/auto-approve.yml
@@ -0,0 +1,12 @@
name: Auto Approve
on:
pull_request_target:
types: [opened, reopened, synchronize, labeled]
jobs:
auto-approve:
runs-on: ubuntu-latest
steps:
- uses: hmarr/auto-approve-action@v2.1.0
if: github.actor == 'dependabot[bot]' || github.actor == 'allcontributors[bot]'
with:
github-token: "${{ secrets.USE_GITHUB_TOKEN }}"
28 changes: 5 additions & 23 deletions .github/workflows/pr-checks.yml
@@ -1,13 +1,12 @@
name: Pull Request Checks
name: Run Tests
on:
pull_request_target:
types: [opened, reopened, synchronize, labeled]
pull_request:
push:
branches:
- master
jobs:
spec-test:
runs-on: ubuntu-latest
if: |
github.actor == 'dependabot[bot]' ||
contains(github.event.pull_request.labels.*.name, 'safe to test')
steps:
- name: checkout code
uses: actions/checkout@v2.3.4
Expand All @@ -17,18 +16,13 @@ jobs:
ruby-version: "2.7"
bundler-cache: true
- name: run unit tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bundle exec rake
- name: run e2e tests
run: |
bundle exec fastlane test
bundle exec fastlane test_no_version_code
regression-test:
runs-on: ubuntu-latest
if: |
github.actor == 'dependabot[bot]' ||
contains(github.event.pull_request.labels.*.name, 'safe to test')
steps:
- uses: actions/checkout@v2.3.4
- uses: ruby/setup-ruby@v1
Expand All @@ -49,15 +43,3 @@ jobs:
cp ../../regression/Gemfile .
bundle install
bundle exec fastlane regression
auto-approve:
runs-on: ubuntu-latest
needs: [spec-test, regression-test]
steps:
- uses: hmarr/auto-approve-action@v2.1.0
if: github.actor == 'dependabot[bot]'
with:
github-token: "${{ secrets.USE_GITHUB_TOKEN }}"
- uses: hmarr/auto-approve-action@v2.1.0
if: github.actor == 'allcontributors[bot]'
with:
github-token: "${{ secrets.USE_GITHUB_TOKEN }}"

0 comments on commit e1f4f4c

Please sign in to comment.