-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.1 KB
/
tests.yml
File metadata and controls
44 lines (38 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Tests
on:
pull_request:
branches: ['*']
jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run unit tests
run: |
bash tests/test_update_pr_stack.sh
bash tests/test_rebase_workflow.sh
bash tests/test_mixed_workflows.sh
e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
# Only run if secrets are available (not available on forks)
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: autorestack-test
- name: Run e2e tests
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
PRESERVE_ON_FAILURE: "1"
run: |
gh auth setup-git
bash tests/test_e2e.sh