Skip to content

action: run workflow when pushing on main #8

action: run workflow when pushing on main

action: run workflow when pushing on main #8

Workflow file for this run

name: Pull request workflows
on:
pull_request:
branches: ["main"]
types: ["opened", "synchronize"]
push:
branches: ["main"]
workflow_dispatch:
jobs:
flake8:
name: "Flake 8 style"
runs-on: ubuntu-latest
steps:
- name: "📥 Fetching Repository Contents"
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: "💫 Install package dependencies"
run: python -m pip install flake8
- name: "🤖 Check flake8 style"
run: flake8 -v --count
pytest:
name: "Run python tests"
runs-on: ubuntu-latest
steps:
- name: "📥 Fetching Repository Contents"
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: "💫 Install package dependencies"
run: |
python -m pip install pytest
python -m pip install -r requirements.txt
- name: "🤖 Run pytest"
run: |
pytest test