Skip to content

feat: add .github/workflows/ #2

feat: add .github/workflows/

feat: add .github/workflows/ #2

Workflow file for this run

name: Python Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: pytest
- name: Check if tests passed
run: |
test_exit_code=$?
if [ $test_exit_code -eq 0 ]; then
echo "Tests passed!"
else
echo "Tests failed!"
exit $test_exit_code
fi