Skip to content

Commit d5b048b

Browse files
committed
Update CI config.
1 parent a4c0cb2 commit d5b048b

File tree

4 files changed

+155
-2
lines changed

4 files changed

+155
-2
lines changed

.ci/actions_deploy_conda.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
# This file is managed by 'repo_helper'. Don't edit it directly.
3+
4+
set -e -x
5+
6+
python3 -m pip install repo_helper || exit 1
7+
python3 -m repo_helper make-recipe || exit 1
8+
9+
# Switch to miniconda
10+
source "/home/runner/miniconda/etc/profile.d/conda.sh"
11+
hash -r
12+
conda activate base
13+
conda config --set always_yes yes --set changeps1 no
14+
conda update -q conda
15+
conda install conda-build
16+
conda install anaconda-client
17+
conda info -a
18+
19+
conda config --add channels domdfcoding || exit 1
20+
21+
conda config --add channels conda-forge || exit 1
22+
23+
conda build conda -c domdfcoding -c conda-forge --output-folder conda/dist --skip-existing
24+
25+
for f in conda/dist/noarch/domdf_python_tools-*.tar.bz2; do
26+
[ -e "$f" ] || continue
27+
echo "$f"
28+
conda install "$f" || exit 1
29+
echo "Deploying to Anaconda.org..."
30+
anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1
31+
echo "Successfully deployed to Anaconda.org."
32+
done
33+
34+
fi
35+
36+
exit 0

.github/workflows/python_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
matrix:
2020
python-version: ["3.6","3.7","3.8","3.9"]
2121

22-
2322
steps:
2423
- name: Checkout 🛎️
2524
uses: "actions/checkout@v2"
@@ -34,5 +33,6 @@ jobs:
3433
python -m pip install --upgrade pip setuptools wheel
3534
python -m pip install --upgrade tox tox-gh-actions virtualenv
3635
36+
3737
- name: "Run Tests for Python ${{ matrix.python-version }}"
3838
run: "python -m tox"

.github/workflows/python_ci_linux.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
name: Linux Tests
4+
5+
on:
6+
push:
7+
pull_request:
8+
branches: ["master"]
9+
10+
jobs:
11+
tests:
12+
name: "Python ${{ matrix.python-version }}"
13+
runs-on: "ubuntu-18.04"
14+
env:
15+
USING_COVERAGE: '3.6,3.7,3.8,pypy3,3.9'
16+
17+
strategy:
18+
fail-fast: False
19+
matrix:
20+
python-version: ["3.6","3.7","3.8","pypy3","3.9"]
21+
22+
steps:
23+
- name: Checkout 🛎️
24+
uses: "actions/checkout@v2"
25+
- name: Setup Python 🐍
26+
uses: "actions/setup-python@v2"
27+
with:
28+
python-version: "${{ matrix.python-version }}"
29+
- name: Install dependencies 🔧
30+
run: |
31+
python -VV
32+
python -m site
33+
python -m pip install --upgrade pip setuptools wheel
34+
python -m pip install --upgrade tox tox-gh-actions virtualenv
35+
python -m pip install --upgrade coveralls coverage_pyver_pragma
36+
37+
- name: "Run Tests for Python ${{ matrix.python-version }}"
38+
run: "python -m tox"
39+
40+
- name: "Upload Coverage"
41+
uses: actions/upload-artifact@v2
42+
with:
43+
name: "coverage-${{ matrix.python-version }}"
44+
path: .coverage
45+
46+
finish:
47+
needs: tests
48+
runs-on: "ubuntu-18.04"
49+
steps:
50+
- name: Checkout 🛎️
51+
uses: "actions/checkout@v2"
52+
53+
- name: Setup Python 🐍
54+
uses: "actions/setup-python@v2"
55+
with:
56+
python-version: 3.8
57+
58+
- name: Install dependencies 🔧
59+
run: |
60+
python -m pip install --upgrade pip setuptools wheel
61+
python -m pip install --upgrade tox
62+
python -m pip install --upgrade coveralls coverage_pyver_pragma
63+
64+
- name: "Download Coverage"
65+
uses: actions/download-artifact@v2
66+
with:
67+
path: coverage
68+
69+
- name: Display structure of downloaded files
70+
run: ls -R
71+
working-directory: coverage
72+
73+
- name: Combine Coverage
74+
run: |
75+
shopt -s globstar
76+
python -m coverage combine coverage/**/.coverage
77+
78+
- name: "Upload Combined Coverage Aretfact"
79+
uses: actions/upload-artifact@v2
80+
with:
81+
name: "combined-coverage"
82+
path: .coverage
83+
84+
- name: "Upload Combined Coverage to Coveralls"
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
run: |
88+
coveralls
89+
90+
- name: Build source distribution 📦
91+
run: |
92+
tox -e build
93+
rm dist/*.whl
94+
95+
- name: Upload distribution 📦 to PyPI
96+
if: startsWith(github.ref, 'refs/tags/')
97+
uses: pypa/gh-action-pypi-publish@master
98+
with:
99+
user: __token__
100+
password: ${{ secrets.pypi_password }}
101+
skip_existing: true
102+
103+
104+
conda:
105+
needs: tests
106+
runs-on: "ubuntu-18.04"
107+
steps:
108+
- name: Checkout 🛎️
109+
uses: "actions/checkout@v2"
110+
111+
- name: Install dependencies 🔧
112+
run: |
113+
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
114+
bash miniconda.sh -b -p $HOME/miniconda
115+
chmod +x .ci/github_deploy_conda.sh
116+
env:
117+
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}

.github/workflows/python_ci_macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
matrix:
2020
python-version: ["3.6","3.7","3.8","pypy3","3.9"]
2121

22-
2322
steps:
2423
- name: Checkout 🛎️
2524
uses: "actions/checkout@v2"
@@ -34,5 +33,6 @@ jobs:
3433
python -m pip install --upgrade pip setuptools wheel
3534
python -m pip install --upgrade tox tox-gh-actions virtualenv
3635
36+
3737
- name: "Run Tests for Python ${{ matrix.python-version }}"
3838
run: "python -m tox"

0 commit comments

Comments
 (0)