Merge branch 'topic/okurth/push-to-github' into 'master' #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: photon-os-installer CI | |
on: [pull_request, push, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- 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 | |
- name: Run Pytest | |
run: | | |
pytest -x tests/poi-container-test.py | |