Open nh916 opened 1 year ago
It just hangs in windows
name: "Python Release"
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types: [created]
jobs:
unit-tests:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install pypa/build
run: >-
python3 -m
pip install
build hatchling
--user
- name: Make VERSION
run: python make_version.py
- name: install self
run: pip install -e .
- name: Unit Tests
run: pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Style Guide
run: flake8
If you let it run it times out, but force kill and you can see the tests completed in the same 10s it takes on Mac and Ubuntu.
For example run on open source project: https://github.com/StartupOS/verinfast/actions/runs/6263214547/job/17007095128
Description
We are using the pytest-cov within our project in our GitHub workflow to check that our tests cover at least 90% of our code, and I noticed that for some reason this workflow takes the longest to complete, and sometimes takes over an hour to finish. I am not sure if this is something I am doing wrong, the package is slow, or GitHub workflow is just slow. Our project does have over 150 tests as well, not sure if that is an issue or not. When running the package locally it is pretty fast. Please let me know your thoughts when possible, I am trying to optimize the GitHub workflow.