Skip to content

Create ci.yml

Create ci.yml #1

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
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
id: run-tests
run: |
pytest --junitxml=test-results.xml
continue-on-error: true
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: test-results
path: test-results.xml
- name: Create GitHub Issue on Failure
if: failure()
uses: actions/create-issue@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: Build Failure
body-path: ./issue-template.md
labels: bug
assignees: your-github-username
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.