-
Notifications
You must be signed in to change notification settings - Fork 1
155 lines (153 loc) · 6.87 KB
/
Copy pathtest-docker.yml
File metadata and controls
155 lines (153 loc) · 6.87 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
---
name: Tests - Docker Compose
on:
workflow_call:
secrets:
FO_INTERNAL_LICENSE:
required: true
FO_LEGACY_LICENSE:
required: true
ORG_RO_ALOHA_GITHUB_WORKFLOWS_FG_PAT:
required: true
REPO_GOOGLE_WORKLOAD_IDP:
required: true
jobs:
unit-compose:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Checkout voxel51/aloha-github-workflows
uses: actions/checkout@v7
with:
repository: voxel51/aloha-github-workflows
ref: main
token: ${{ secrets.ORG_RO_ALOHA_GITHUB_WORKFLOWS_FG_PAT }}
path: ./.github/actions/aloha-github-workflows
- name: Set generate-version-file action's path from remote to local
# Public repos cannot access private action repo without GitHub Enterprise
# Instead, we clone the private workflow directory and update the `asdf-install-and-cache/action.yml`
# file's reference to `voxel51/aloha-github-workflows/.github/actions/generate-version-file` with the local path.
shell: bash
run: |
sed -i \
's%voxel51/aloha-github-workflows/.github/actions/generate-version-file@main%./.github/actions/aloha-github-workflows/.github/actions/generate-version-file%' \
.github/actions/aloha-github-workflows/.github/actions/asdf-install-and-cache/action.yml
- uses: actions/setup-python@v6.3.0
- name: Install asdf & tools
uses: ./.github/actions/aloha-github-workflows/.github/actions/asdf-install-and-cache
- name: Run unit tests
shell: bash
run: |
make test-unit-compose
integration-compose-internal:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Free Disk Space (Ubuntu) # standard runner's 14 GB available disk size isn't enough. Need at least 22 GB free.
uses: jlumbroso/free-disk-space@v1.3.1
- name: Checkout voxel51/aloha-github-workflows
uses: actions/checkout@v7
with:
repository: voxel51/aloha-github-workflows
ref: main
token: ${{ secrets.ORG_RO_ALOHA_GITHUB_WORKFLOWS_FG_PAT }}
path: ./.github/actions/aloha-github-workflows
- name: Set generate-version-file action's path from remote to local
# Public repos cannot access private action repo without GitHub Enterprise
# Instead, we clone the private workflow directory and update the `asdf-install-and-cache/action.yml`
# file's reference to `voxel51/aloha-github-workflows/.github/actions/generate-version-file` with the local path.
shell: bash
run: |
sed -i \
's%voxel51/aloha-github-workflows/.github/actions/generate-version-file@main%./.github/actions/aloha-github-workflows/.github/actions/generate-version-file%' \
.github/actions/aloha-github-workflows/.github/actions/asdf-install-and-cache/action.yml
- uses: actions/setup-python@v6.3.0
- name: Temporary SQLite/LZMA - Install missing libraries
run: sudo apt install -y libsqlite3-dev libbz2-dev
- name: Install asdf & tools
uses: ./.github/actions/aloha-github-workflows/.github/actions/asdf-install-and-cache
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v3
with:
project_id: 'computer-vision-team'
service_account: 'github@computer-vision-team.iam.gserviceaccount.com'
token_format: access_token
workload_identity_provider: ${{ secrets.REPO_GOOGLE_WORKLOAD_IDP }}
- name: Set Up Cloud SDK
uses: google-github-actions/setup-gcloud@v3
- name: Login to GAR
uses: docker/login-action@v4
with:
registry: us-central1-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: Create Local License From Secret
uses: mobiledevops/secret-to-file-action@v2
with:
base64-encoded-secret: ${{ secrets.FO_INTERNAL_LICENSE }}
filename: 'internal-license.key'
is-executable: false
working-directory: './docker'
- name: Run compose integration tests for internal
shell: bash
run: |
make test-integration-compose-internal
integration-compose-legacy:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Free Disk Space (Ubuntu) # standard runner's 14 GB available disk size isn't enough. Need at least 22 GB free.
uses: jlumbroso/free-disk-space@v1.3.1
- name: Checkout voxel51/aloha-github-workflows
uses: actions/checkout@v7
with:
repository: voxel51/aloha-github-workflows
ref: main
token: ${{ secrets.ORG_RO_ALOHA_GITHUB_WORKFLOWS_FG_PAT }}
path: ./.github/actions/aloha-github-workflows
- name: Set generate-version-file action's path from remote to local
# Public repos cannot access private action repo without GitHub Enterprise
# Instead, we clone the private workflow directory and update the `asdf-install-and-cache/action.yml`
# file's reference to `voxel51/aloha-github-workflows/.github/actions/generate-version-file` with the local path.
shell: bash
run: |
sed -i \
's%voxel51/aloha-github-workflows/.github/actions/generate-version-file@main%./.github/actions/aloha-github-workflows/.github/actions/generate-version-file%' \
.github/actions/aloha-github-workflows/.github/actions/asdf-install-and-cache/action.yml
- uses: actions/setup-python@v6.3.0
- name: Install asdf & tools
uses: ./.github/actions/aloha-github-workflows/.github/actions/asdf-install-and-cache
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v3
with:
project_id: 'computer-vision-team'
service_account: 'github@computer-vision-team.iam.gserviceaccount.com'
token_format: access_token
workload_identity_provider: ${{ secrets.REPO_GOOGLE_WORKLOAD_IDP }}
- name: Set Up Cloud SDK
uses: google-github-actions/setup-gcloud@v3
- name: Login to GAR
uses: docker/login-action@v4
with:
registry: us-central1-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- name: Create Local License From Secret
uses: mobiledevops/secret-to-file-action@v2
with:
base64-encoded-secret: ${{ secrets.FO_LEGACY_LICENSE }}
filename: 'legacy-license.key'
is-executable: false
working-directory: './docker'
- name: Run compose integration tests for legacy
shell: bash
run: |
make test-integration-compose-legacy