Skip to content

Commit 28c3e1b

Browse files
committed
chore: merge branch 'main' into feat/rfc
2 parents 511cac0 + aed328b commit 28c3e1b

228 files changed

Lines changed: 3089 additions & 3207 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/tests-az.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Tests (Azure Test)
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
main:
8+
name: Run Tests on Azure temp VM
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
contents: read
13+
14+
steps:
15+
- name: Launch VM on Azure
16+
id: azlaunch
17+
run: |
18+
echo "Authenticating to Azure..."
19+
az login --service-principal -u ${{ secrets.AZ_TESTS_APP_ID }} -p ${{ secrets.AZ_TESTS_PWD }} --tenant ${{ secrets.AZ_TESTS_TENANT_ID }}
20+
echo "Creating VM..."
21+
vminfo=$(az vm create \
22+
--resource-group ghaDatatrackerTests \
23+
--name tmpGhaVM2 \
24+
--image Ubuntu2204 \
25+
--admin-username azureuser \
26+
--generate-ssh-keys \
27+
--priority Spot \
28+
--size Standard_D4as_v5 \
29+
--max-price -1 \
30+
--os-disk-size-gb 30 \
31+
--eviction-policy Delete \
32+
--nic-delete-option Delete \
33+
--output tsv \
34+
--query "publicIpAddress")
35+
echo "ipaddr=$vminfo" >> "$GITHUB_OUTPUT"
36+
echo "VM Public IP: $vminfo"
37+
cat ~/.ssh/id_rsa > ${{ github.workspace }}/prvkey.key
38+
ssh-keyscan -t rsa $vminfo >> ~/.ssh/known_hosts
39+
40+
- name: Remote SSH into VM
41+
uses: appleboy/ssh-action@55dabf81b49d4120609345970c91507e2d734799
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
with:
45+
host: ${{ steps.azlaunch.outputs.ipaddr }}
46+
port: 22
47+
username: azureuser
48+
command_timeout: 60m
49+
key_path: ${{ github.workspace }}/prvkey.key
50+
envs: GITHUB_TOKEN
51+
script_stop: true
52+
script: |
53+
export DEBIAN_FRONTEND=noninteractive
54+
lsb_release -a
55+
sudo apt-get update
56+
sudo apt-get upgrade -y
57+
58+
echo "Installing Docker..."
59+
curl -fsSL https://get.docker.com -o get-docker.sh
60+
sudo sh get-docker.sh
61+
62+
echo "Starting Containers..."
63+
sudo docker network create dtnet
64+
sudo docker run -d --name db --network=dtnet ghcr.io/ietf-tools/datatracker-db:latest &
65+
sudo docker run -d --name app --network=dtnet ghcr.io/ietf-tools/datatracker-app-base:latest sleep infinity &
66+
wait
67+
68+
echo "Cloning datatracker repo..."
69+
sudo docker exec app git clone --depth=1 https://github.com/ietf-tools/datatracker.git .
70+
echo "Prepare tests..."
71+
sudo docker exec app chmod +x ./dev/tests/prepare.sh
72+
sudo docker exec app sh ./dev/tests/prepare.sh
73+
echo "Running checks..."
74+
sudo docker exec app ietf/manage.py check
75+
sudo docker exec app ietf/manage.py migrate --fake-initial
76+
echo "Running tests..."
77+
sudo docker exec app ietf/manage.py test -v2 --validate-html-harder --settings=settings_test
78+
79+
- name: Destroy VM + resources
80+
if: always()
81+
shell: pwsh
82+
run: |
83+
echo "Destroying VM..."
84+
az vm delete -g ghaDatatrackerTests -n tmpGhaVM2 --yes --force-deletion true
85+
86+
$resourceOrderRemovalOrder = [ordered]@{
87+
"Microsoft.Compute/virtualMachines" = 0
88+
"Microsoft.Compute/disks" = 1
89+
"Microsoft.Network/networkInterfaces" = 2
90+
"Microsoft.Network/publicIpAddresses" = 3
91+
"Microsoft.Network/networkSecurityGroups" = 4
92+
"Microsoft.Network/virtualNetworks" = 5
93+
}
94+
echo "Fetching remaining resources..."
95+
$resources = az resource list --resource-group ghaDatatrackerTests | ConvertFrom-Json
96+
97+
$orderedResources = $resources
98+
| Sort-Object @{
99+
Expression = {$resourceOrderRemovalOrder[$_.type]}
100+
Descending = $False
101+
}
102+
103+
echo "Deleting remaining resources..."
104+
$orderedResources | ForEach-Object {
105+
az resource delete --resource-group ghaDatatrackerTests --ids $_.id --verbose
106+
}
107+
108+
echo "Logout from Azure..."
109+
az logout

.pnp.cjs

Lines changed: 923 additions & 840 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
121 KB
Binary file not shown.

.yarn/cache/@css-render-plugin-bem-npm-0.15.10-41ccecaa2f-cbab72a7b5.zip renamed to .yarn/cache/@css-render-plugin-bem-npm-0.15.12-bf8b43dc1f-9fa7ddd62b.zip

5.19 KB
Binary file not shown.
Binary file not shown.

.yarn/cache/@eslint-js-npm-8.49.0-e8f6510b47-a6601807c8.zip renamed to .yarn/cache/@eslint-js-npm-8.51.0-51f088b88b-0228bf1e1e.zip

6.01 KB
Binary file not shown.

.yarn/cache/@fullcalendar-bootstrap5-npm-6.1.8-bbeae5dafc-c78ef0d62e.zip renamed to .yarn/cache/@fullcalendar-bootstrap5-npm-6.1.9-ef68c3c094-1d6168fafc.zip

7.13 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)