Create python-app.yml #8
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: Python application | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgl1-mesa-glx libxkbcommon-x11-0 xvfb | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run application with Xvfb | |
run: | | |
Xvfb :99 -screen 0 1024x768x16 & | |
export DISPLAY=:99 | |
python pythonProject/main.py |