Skip to content

Commit 188887b

Browse files
committed
Run actions on windoes
Github actions tested on windows. Signed-off-by: User Name <[email protected]>
1 parent 29b16f0 commit 188887b

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

.github/workflows/python-package.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ on: [pull_request]
77

88
jobs:
99
build:
10-
11-
runs-on: ubuntu-latest
1210
strategy:
1311
fail-fast: false
1412
matrix:
1513
python-version: ["3.8", "3.9", "3.10", "3.11" ]
16-
14+
os: [ubuntu-latest, windows-latest]
15+
runs-on: ${{ matrix.os }}
1716
steps:
1817
- uses: actions/checkout@v2
1918
- name: Set up Python ${{ matrix.python-version }}
2019
uses: actions/setup-python@v2
2120
with:
2221
python-version: ${{ matrix.python-version }}
23-
- name: Install dependencies
22+
- name: Install C dependencies
23+
if: ${{ matrix.os == 'ubuntu-latest' }}
2424
run: |
2525
export DEBIAN_FRONTEND=noninteractive
2626
# https://github.com/community/community/discussions/47863
@@ -36,25 +36,41 @@ jobs:
3636
sudo apt-get autoclean
3737
sudo apt-get clean
3838
sudo rm -rf /var/lib/apt/lists/*
39+
shell: bash
40+
- name: Install dependencies
41+
run: |
3942
python3 -m pip install --upgrade pip
4043
python3 -m pip install -r requirements-dev.txt
44+
shell: bash
4145
- name: Run integrity checks
4246
run: |
4347
./scripts/version.sh
4448
pycodestyle --format=pylint archivist examples functests unittests
4549
python3 -m pylint archivist examples functests unittests
4650
python3 -m pyright --stats archivist
4751
black archivist examples unittests functests
48-
./scripts/zipnotebooks.sh
49-
(cd docs && make clean && make html)
5052
modified=$(git status -s | wc -l)
5153
if [ $modified -gt 0 ]
5254
then
5355
echo "there are $modified files that must be reformatted"
5456
exit 1
5557
fi
5658
./scripts/unittests.sh
59+
shell: bash
60+
- name: Run zip notebooks
61+
if: ${{ matrix.os == 'ubuntu-latest' }}
62+
run: |
63+
./scripts/zipnotebooks.sh
64+
shell: bash
65+
- name: Run docs generation
66+
if: ${{ matrix.os == 'ubuntu-latest' }}
67+
run: |
68+
cd docs
69+
make clean
70+
make html
71+
shell: bash
5772
- uses: pypa/[email protected]
73+
if: ${{ matrix.os == 'ubuntu-latest' }}
5874
with:
5975
inputs: requirements.txt
6076

scripts/version.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
#
33
# inserts version into python package
44
#
55
if [ -n "${GITHUB_REF}" ]
66
then
7-
version=$(echo ${GITHUB_REF} | rev | cut -d'/' -f1 | rev )
7+
version=${GITHUB_REF##*/}
88
else
99
version=$(git describe --tags --long --dirty)
1010
fi

0 commit comments

Comments
 (0)