-
Notifications
You must be signed in to change notification settings - Fork 76
56 lines (48 loc) · 1.86 KB
/
ci.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
name: codejail-ci
on:
push:
branches:
- master
pull_request:
jobs:
codejail_ci:
name: tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- python_version: '3.11'
ubuntu_version: '20.04'
os: "ubuntu-20.04"
- python_version: '3.11'
ubuntu_version: '22.04'
os: "ubuntu-22.04"
- python_version: '3.11'
ubuntu_version: '24.04'
os: "ubuntu-24.04"
steps:
- uses: actions/checkout@v4
- name: Parse custom apparmor profile with default feature ABI
if: ${{ matrix.ubuntu_version == '20.04' }}
run: sudo apparmor_parser -r -W apparmor-profiles/home.sandbox.codejail_sandbox-python3.bin.python-default-abi
- name: Parse custom apparmor profile with ABI 3.0
if: ${{ matrix.ubuntu_version != '20.04' }}
run: sudo apparmor_parser -r -W apparmor-profiles/home.sandbox.codejail_sandbox-python3.bin.python-abi3
- name: Build latest code changes into CI image
run: |
docker build -t openedx-codejail \
--cache-to type=gha \
--cache-from type=gha \
--build-arg python_version=${{ matrix.python_version }} \
--build-arg ubuntu_version=${{ matrix.ubuntu_version }} .
- name: Run container with custom apparmor profile and codejail CI image
run: |
docker run --name=codejail --privileged -d --security-opt apparmor=apparmor_profile \
openedx-codejail tail -f /dev/null
- name: Run Non Proxy Tests
run: docker exec -t codejail bash -c 'make clean && make test_no_proxy'
- name: Run Proxy Tests
run: docker exec -t codejail bash -c 'make clean && make test_proxy'
- name: Run Quality Tests
run: docker exec -t codejail bash -c 'make quality'