This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 422
108 lines (92 loc) · 4.06 KB
/
provisioning-tests.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
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
# Core tests: Provision and bring up various services on devstack
name: Provisioning tests
on:
push:
branches: [master]
paths-ignore:
- '**.rst'
pull_request:
paths-ignore:
- '**.rst'
schedule:
# run at 7:30 am M-F
- cron: '30 11 * * 1-5'
jobs:
run_ci:
runs-on: ${{ matrix.os }}
env:
DEVSTACK_WORKSPACE: /tmp
SHALLOW_CLONE: 1
# Don't report metrics as real usage
DEVSTACK_METRICS_TESTING: ci
strategy:
matrix:
os:
- ubuntu-20.04 # Ubuntu 20.04 "Focal Fossa"
python-version: [ '3.8' ]
services: [ discovery+lms+forum ,registrar+lms, ecommerce+lms, edx_notes_api+lms, credentials+lms, xqueue, analyticsapi+insights+lms]
fail-fast: false # some services can be flaky; let others run to completion even if one fails
steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: installations and version upgrades
run: |
docker version
sudo apt-get update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal test"
sudo apt update
sudo apt install docker-ce containerd.io
docker version
docker compose --version
- name: free up disk space
# 2023-09-28: google-cloud-sdk removed from this list because it was intermittently
# unavailable as an apt package to remove, and might be migrating to snap. If more
# disk space is needed, see if the snap is installed, and remove that.
run: sudo apt remove --purge -y ghc-* azure-cli hhvm llvm-* dotnet-* powershell mono-* php* ruby*
- name: set up requirements
run: make requirements
- name: clone repositories
run: make dev.clone.https
- name: pull images and print
run: |
make dev.pull.${{matrix.services}}
docker images --digests | grep latest | sort
- name: provision
run: make dev.provision.${{matrix.services}}
- name: dev.up
run: make dev.up.${{matrix.services}}
- name: dev.check
run: make dev.check.${{matrix.services}}
- name: notify on failure
if: ${{ failure() && github.ref == 'refs/heads/master' }}
uses: dawidd6/action-send-mail@v3
with:
server_address: email-smtp.us-east-1.amazonaws.com
server_port: 465
username: ${{secrets.EDX_SMTP_USERNAME}}
password: ${{secrets.EDX_SMTP_PASSWORD}}
subject: 'Failure: Devstack provisioning tests for ${{matrix.services}} #${{github.run_id}}'
from: github-actions <[email protected]>
body: |
Devstack provisioning tests in ${{github.repository}} for ${{matrix.services}} failed! For details see <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}>.
Runbook url: https://2u-internal.atlassian.net/wiki/spaces/AT/pages/16384920/Failure+Devstack+provisioning+tests+-+Runbook
- name: close alerts on success
if: ${{ !failure() && github.ref == 'refs/heads/master' }}
uses: dawidd6/action-send-mail@v3
with:
server_address: email-smtp.us-east-1.amazonaws.com
server_port: 465
username: ${{secrets.EDX_SMTP_USERNAME}}
password: ${{secrets.EDX_SMTP_PASSWORD}}
subject: 'Back to normal: Devstack provisioning tests for ${{matrix.services}} #${{github.run_id}}'
from: github-actions <[email protected]>
body: Devstack provisioning tests in ${{github.repository}} are back to normal for ${{matrix.services}}
- name: docs
run: make docs