forked from vmware/photon-os-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (41 loc) · 1.31 KB
/
Copy pathphoton-os-installer.yml
File metadata and controls
54 lines (41 loc) · 1.31 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
name: photon-os-installer CI
on: [pull_request, push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Lint checks
run: |
sudo apt update
sudo apt install -y black isort shellcheck flake8
bash lint-checks.sh
- name: Build Docker image
run: |
POI_IMAGE_NAME=photon/installer:${{ github.sha }}
cd docker
docker build -t $POI_IMAGE_NAME --build-context poi-helper=$(realpath $(pwd)/..) .
docker system prune -f
test:
runs-on: ubuntu-latest
needs: build # This ensures the test job runs after the build job
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x # Specify the Python version you need
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # Ensure this file lists the necessary dependencies
- name: install pytest
run: pip install pytest pexpect
- name: Run Pytest
run: |
pytest -x tests/poi-container-test.py
- name: Run interactive installer dialog tests
run: |
pytest -x tests/test_iso_dialogs.py