11name : 🕵️ Test suite
22
3+ concurrency :
4+ group : ${{ github.workflow }}-${{ github.ref }}
5+ cancel-in-progress : true
6+
37on :
48 push :
59 branches :
1519 # Run unit tests on different version of python and browser
1620 name : 🐍 Python-${{ matrix.python-version }}-${{ matrix.browser }}
1721 runs-on : ubuntu-latest
22+ timeout-minutes : 30
1823 strategy :
1924 matrix :
2025 browser : [chromium, firefox]
@@ -38,82 +43,90 @@ jobs:
3843 - name : UnitTest - Python-${{ matrix.python-version }}-${{ matrix.browser }}
3944 run : |
4045 pip install -e .[test]
41- pytest -n 5 -sqvv --browser=${{ matrix.browser }} --headless --cov=src --cov-report=xml
42-
43- # - name: Upload coverage to Codecov
44- # uses: codecov/codecov-action@v4
45- # with:
46- # file: coverage.xml
47- # flags: unittests
48- # name: ${{ github.run_id }}-py-${{ matrix.python-version }}-${{ matrix.browser }}
49- # token: ${{ secrets.CODECOV_TOKEN }}
50- #
51- # docs:
52- # name: Docs Build
53- # runs-on: ubuntu-latest
54- # steps:
55- # - name: Checkout
56- # uses: actions/checkout@v4
57- #
58- # - name: Setup Python
59- # uses: actions/setup-python@v5
60- # with:
61- # python-version: "3.x"
62- #
63- # - name: Install Deps
64- # run: |
65- # pip install -U pip wheel
66- # pip install .[docs]
67- #
68- # - name: Build Docs
69- # run: sphinx-build -b html -d build/sphinx-doctrees docs build/htmldocs
70- #
71- # - name: Archive Docs
72- # uses: actions/upload-artifact@v4
73- # with:
74- # name: sphinx-htmldocs
75- # path: build/htmldocs
76- #
77- # platform:
78- # # Check package properly install on different platform (dev setup)
79- # name: 💻 Platform-${{ matrix.os }}
80- # runs-on: ${{ matrix.os }}
81- # strategy:
82- # matrix:
83- # os: [windows-latest, macos-latest] # We are running test on ubuntu linux.
84- #
85- # steps:
86- # - name: Checkout
87- # uses: actions/checkout@v4
88- #
89- # - name: Setup Python
90- # uses: actions/setup-python@v5
91- # with:
92- # python-version: "3.x"
93- # architecture: "x64"
94- #
95- # - name: Development setup on ${{ matrix.os }}
96- # run: |
97- # pip install -e .[dev]
98- # python -c "from widgetastic.widget import Widget, Browser"
99- #
100- # package:
101- # name: ⚙️ Build & Verify Package
102- # runs-on: ubuntu-latest
103- #
104- # steps:
105- # - name: Checkout
106- # uses: actions/checkout@v4
107- #
108- # - name: Setup Python
109- # uses: actions/setup-python@v5
110- # with:
111- # python-version: "3.x"
112- # architecture: "x64"
113- #
114- # - name: Build and verify with twine
115- # run: |
116- # pip install wheel twine
117- # pip wheel --no-deps -w dist .
118- # ls -l dist
119- # twine check dist/*
46+ pytest -n 2 -sqvv --browser=${{ matrix.browser }} --headless --cov=src --cov-report=xml
47+
48+ - name : Upload coverage to Codecov
49+ uses : codecov/codecov-action@v4
50+ with :
51+ file : coverage.xml
52+ flags : unittests
53+ name : ${{ github.run_id }}-py-${{ matrix.python-version }}-${{ matrix.browser }}
54+ token : ${{ secrets.CODECOV_TOKEN }}
55+
56+ docs :
57+ name : Docs Build
58+ runs-on : ubuntu-latest
59+ timeout-minutes : 15
60+ steps :
61+ - name : Checkout
62+ uses : actions/checkout@v4
63+
64+ - name : Setup Python
65+ uses : actions/setup-python@v5
66+ with :
67+ python-version : " 3.x"
68+ cache : ' pip'
69+
70+ - name : Install Deps
71+ run : |
72+ pip install -U pip wheel
73+ pip install .[docs]
74+
75+ - name : Build Docs
76+ run : sphinx-build -b html -d build/sphinx-doctrees docs build/htmldocs
77+
78+ - name : Archive Docs
79+ uses : actions/upload-artifact@v4
80+ with :
81+ name : sphinx-htmldocs
82+ path : build/htmldocs
83+
84+ platform :
85+ # Check package properly install on different platform (dev setup)
86+ name : 💻 Platform-${{ matrix.os }}
87+ runs-on : ${{ matrix.os }}
88+ timeout-minutes : 20
89+ needs : [tests]
90+ strategy :
91+ matrix :
92+ os : [windows-latest, macos-latest] # We are running test on ubuntu linux.
93+
94+ steps :
95+ - name : Checkout
96+ uses : actions/checkout@v4
97+
98+ - name : Setup Python
99+ uses : actions/setup-python@v5
100+ with :
101+ python-version : " 3.x"
102+ architecture : " x64"
103+ cache : ' pip'
104+
105+ - name : Development setup on ${{ matrix.os }}
106+ run : |
107+ pip install -e .[dev]
108+ python -c "from widgetastic.widget import Widget, Browser"
109+
110+ package :
111+ name : ⚙️ Build & Verify Package
112+ runs-on : ubuntu-latest
113+ timeout-minutes : 15
114+ needs : [tests, docs]
115+
116+ steps :
117+ - name : Checkout
118+ uses : actions/checkout@v4
119+
120+ - name : Setup Python
121+ uses : actions/setup-python@v5
122+ with :
123+ python-version : " 3.x"
124+ architecture : " x64"
125+ cache : ' pip'
126+
127+ - name : Build and verify with twine
128+ run : |
129+ pip install wheel twine
130+ pip wheel --no-deps -w dist .
131+ ls -l dist
132+ twine check dist/*
0 commit comments