* constrain auto-close and enforce-dependency-review triggers we don't need to run these on PR close or when we apply labels, for example * skip workflows on push to dependabot branch * use PAT if available else fall back to workflow token * further constrain pull_request triggers Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Integration
|
|
on:
|
|
pull_request:
|
|
types: [opened, edited, reopened, synchronize]
|
|
push:
|
|
branches-ignore:
|
|
- 'gh-pages'
|
|
- 'dependabot/**'
|
|
|
|
jobs:
|
|
test-integration:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
PAT_EXISTS: ${{ secrets.GH_PAT != '' }}
|
|
|
|
services:
|
|
redis:
|
|
image: redis
|
|
options: >-
|
|
--health-cmd "redis-cli ping"
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
- 6379:6379
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
node-version: 16
|
|
|
|
- name: Integration Tests (with PAT)
|
|
if: ${{ env.PAT_EXISTS == 'true' }}
|
|
uses: ./.github/actions/integration-tests
|
|
with:
|
|
github-token: '${{ secrets.GH_PAT }}'
|
|
|
|
- name: Integration Tests (with workflow token)
|
|
if: ${{ env.PAT_EXISTS == 'false' }}
|
|
uses: ./.github/actions/integration-tests
|
|
with:
|
|
github-token: '${{ secrets.GITHUB_TOKEN }}'
|