forked from KelvinTegelaar/CIPP
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (64 loc) · 2.32 KB
/
cipp_api_tests.yml
File metadata and controls
67 lines (64 loc) · 2.32 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
name: CIPP API Tests
on:
pull_request:
branches:
- dev
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
api-tests:
if: github.repository_owner == 'KelvinTegelaar'
name: API Shape & Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- name: Run Shape Tests
id: shape-tests
shell: pwsh
env:
CIPP_API_URL: ${{ secrets.CIPP_TEST_API_URL }}
CIPP_CLIENT_ID: ${{ secrets.CIPP_TEST_CLIENT_ID }}
CIPP_CLIENT_SECRET: ${{ secrets.CIPP_TEST_CLIENT_SECRET }}
CIPP_TENANT_ID: ${{ secrets.CIPP_TEST_TENANT_ID }}
CIPP_API_SCOPE: ${{ secrets.CIPP_TEST_API_SCOPE }}
CIPP_TENANT_FILTER: ${{ secrets.CIPP_TEST_TENANT_FILTER }}
run: |
./Tools/Invoke-CippShapeTests.ps1 `
-CippApiUrl $env:CIPP_API_URL `
-CippClientId $env:CIPP_CLIENT_ID `
-CippClientSecret $env:CIPP_CLIENT_SECRET `
-CippTenantId $env:CIPP_TENANT_ID `
-CippApiScope $env:CIPP_API_SCOPE `
-TenantFilter $env:CIPP_TENANT_FILTER `
-CI
- name: Run Integration Tests
if: always()
id: integration-tests
shell: pwsh
env:
CIPP_API_URL: ${{ secrets.CIPP_TEST_API_URL }}
CIPP_CLIENT_ID: ${{ secrets.CIPP_TEST_CLIENT_ID }}
CIPP_CLIENT_SECRET: ${{ secrets.CIPP_TEST_CLIENT_SECRET }}
CIPP_TENANT_ID: ${{ secrets.CIPP_TEST_TENANT_ID }}
CIPP_API_SCOPE: ${{ secrets.CIPP_TEST_API_SCOPE }}
CIPP_TENANT_FILTER: ${{ secrets.CIPP_TEST_TENANT_FILTER }}
run: |
./Tools/Invoke-CippIntegrationTests.ps1 `
-CippApiUrl $env:CIPP_API_URL `
-CippClientId $env:CIPP_CLIENT_ID `
-CippClientSecret $env:CIPP_CLIENT_SECRET `
-CippTenantId $env:CIPP_TENANT_ID `
-CippApiScope $env:CIPP_API_SCOPE `
-TenantFilter $env:CIPP_TENANT_FILTER `
-CI
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results
path: Tests/Shapes/test-results.json
retention-days: 30