-
Notifications
You must be signed in to change notification settings - Fork 15
72 lines (54 loc) · 1.7 KB
/
pr.yml
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
68
69
70
71
72
name: Planetary Computer Tasks PR CI
on:
pull_request:
env:
PCTASKS_COSMOSDB__URL: ${{ secrets.COSMOSDB_URL }}
PCTASKS_COSMOSDB__KEY: ${{ secrets.COSMOSDB_KEY }}
PCTASKS_COSMOSDB__TEST_CONTAINER_SUFFIX: ${{ github.run_id }}
permissions:
id-token: write
jobs:
pr-build-and-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Log in with Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Install local dependencies
run: ./scripts/install
- name: Setup
run: ./scripts/setup --no-aux-servers
- name: Test
run: ./scripts/test
- name: Validate collections
run: ./scripts/validate-collections
# Integration Tests
- name: Install Kind
uses: helm/[email protected]
with:
install_only: true
if: ${{ github.base_ref == 'main' }}
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.8.2
if: ${{ github.base_ref == 'main' }}
- name: Setup cluster
run: ./scripts/cluster setup
if: ${{ github.base_ref == 'main' }}
- name: Run integration tests
run: ./scripts/citest-integration
if: ${{ github.base_ref == 'main' }}
- name: Get docker compose logs
run: docker compose logs
if: always()
- name: Clean up CosmosDB test containers
run: ./scripts/setup --rm-test-containers
if: always()