Skip to content

Commit d1746c0

Browse files
committed
Managing workflows
1 parent 885a8c1 commit d1746c0

File tree

3 files changed

+57
-10
lines changed

3 files changed

+57
-10
lines changed

.github/workflows/deploy-wheels.yml renamed to .github/workflows/deploy-wheels.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ name: Build
22

33
on:
44
push:
5-
#branches:
6-
#- main
5+
branches:
6+
- deploy-pypi-test
7+
- deploy-pypi
78
# Release branches
89
#- "[0-9]+.[0-9]+.X"
9-
10-
tags:
11-
- '*'
12-
10+
1311
# Manual run
1412
workflow_dispatch:
1513

@@ -80,6 +78,8 @@ jobs:
8078
name: Upload to PyPI test
8179
needs: [build_wheels_win_32, build_wheels_win_64]
8280
runs-on: ubuntu-latest
81+
# upload to PyPI test only for pushes to 'deploy-pypi-test'
82+
if: github.event_name == 'push' && github.ref == 'refs/heads/deploy-pypi-test'
8383
steps:
8484
- uses: actions/download-artifact@v2
8585
with:
@@ -97,8 +97,8 @@ jobs:
9797
name: Upload to PyPI
9898
needs: [build_wheels_win_32, build_wheels_win_64]
9999
runs-on: ubuntu-latest
100-
# upload to PyPI test on every tag starting with 'v'
101-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
100+
# upload to PyPI only for pushes to 'deploy-pypi'
101+
if: github.event_name == 'push' && github.ref == 'refs/heads/deploy-pypi'
102102
steps:
103103
- uses: actions/download-artifact@v2
104104
with:

.github/workflows/sphinx-build.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
name: Docs
22
on:
3+
push:
4+
tags:
5+
- '*'
6+
37
# Manual run
48
workflow_dispatch:
9+
510
permissions:
611
contents: write
12+
713
jobs:
814
docs:
915
runs-on: windows-latest
@@ -20,8 +26,7 @@ jobs:
2026
run: |
2127
sphinx-build docs/source _build
2228
- name: Deploy
23-
uses: peaceiris/actions-gh-pages@v3
24-
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
29+
uses: peaceiris/actions-gh-pages@v3
2530
with:
2631
publish_branch: gh-pages
2732
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tests.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- test
8+
# Release branches
9+
#- "[0-9]+.[0-9]+.X"
10+
11+
# Manual run
12+
workflow_dispatch:
13+
14+
jobs:
15+
test_import_package:
16+
name: Testing package on ${{ matrix.config.name }} for Python ${{ matrix.python }}
17+
runs-on: ${{ matrix.config.os }}
18+
strategy:
19+
matrix:
20+
config:
21+
- { os: windows-latest, arch: AMD64, python-arch: x64, name: windows-latest-x64 }
22+
- { os: windows-latest, arch: x86, python-arch: x86, name: windows-latest-x86 }
23+
python: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
24+
steps:
25+
- name: Check out repository
26+
uses: actions/checkout@v3
27+
28+
- name: Set up Python ${{ matrix.python }}
29+
uses: actions/setup-python@v3
30+
with:
31+
python-version: ${{ matrix.python }}
32+
architecture: ${{ matrix.config.python-arch }}
33+
34+
- name: Setup package
35+
run: |
36+
python -m pip install setuptools --upgrade
37+
python -m pip install wheel --upgrade
38+
python setup.py install
39+
40+
- name: Import package
41+
run: |
42+
python -c "import delphivcl"

0 commit comments

Comments
 (0)