Skip to content

Commit 2ebc700

Browse files
author
Aleksei Tiulpin
committed
CI stuff and codecov
1 parent e853f70 commit 2ebc700

File tree

2 files changed

+4
-51
lines changed

2 files changed

+4
-51
lines changed

.github/workflows/prod-release.yaml

Lines changed: 4 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
types: [published]
88

99
jobs:
10-
test-on-master:
10+
test-on-all-push:
1111
name: Test on Master Branch
1212
if: github.event_name == 'push'
1313
runs-on: ubuntu-latest
@@ -31,59 +31,14 @@ jobs:
3131
- name: Install wheel and build tools
3232
run: python -m pip install --upgrade wheel build
3333

34-
- name: Install project dependencies
34+
- name: Install PyTorch and dependencies
3535
run: |
36+
pip install --index-url https://download.pytorch.org/whl/cpu torch==2.6.0
3637
pip install -r ci/requirements.txt
3738
pip install .
3839
3940
- name: Run tests
40-
run: pytest tests --cov solt --cov-report term-missing -v
41-
42-
- name: Check code formatting
43-
run: black --config=black.toml --check .
44-
45-
- name: Run flake8 linter
46-
run: flake8
47-
48-
- name: Upload test results to Codecov
49-
if: ${{ !cancelled() }}
50-
uses: codecov/test-results-action@v1
51-
with:
52-
token: ${{ secrets.CODECOV_TOKEN }}
53-
54-
test-on-release:
55-
name: Test on Release Tag
56-
if: github.event_name == 'release'
57-
runs-on: ubuntu-latest
58-
strategy:
59-
matrix:
60-
python-version: ["3.9", "3.10", "3.11", "3.12"]
61-
fail-fast: false
62-
63-
steps:
64-
- name: Checkout code
65-
uses: actions/checkout@v4
66-
with:
67-
ref: ${{ github.event.release.tag_name }}
68-
69-
- name: Set up Python
70-
uses: actions/setup-python@v5
71-
with:
72-
python-version: ${{ matrix.python-version }}
73-
74-
- name: Update pip
75-
run: python -m pip install --upgrade pip
76-
77-
- name: Install wheel and build tools
78-
run: python -m pip install --upgrade wheel build
79-
80-
- name: Install project dependencies
81-
run: |
82-
pip install -r ci/requirements.txt
83-
pip install .
84-
85-
- name: Run tests
86-
run: pytest tests --cov solt --cov-report term-missing -v
41+
run: pytest tests --cov solt --cov-report=xml --junitxml=./junit.xml
8742

8843
- name: Check code formatting
8944
run: black --config=black.toml --check .

ci/requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ pytest-cov==3.0.0
77
pytest-flake8==1.1.1
88
pytest-pep8==1.0.6
99
pytest-lazy-fixture==0.6.3
10-
torch @ https://download.pytorch.org/whl/cpu-cxx11-abi/torch-2.6.0%2Bcpu.cxx11.abi-cp312-cp312-linux_x86_64.whl#sha256=a45917579548be5c7c97c04531161aa5e3b100e37b815bfdf54402fc0b4a4f36
11-
torchvision==0.21.0

0 commit comments

Comments
 (0)