Feat/ruff #226
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: main | |
pull_request: | |
branches: "*" | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
#os: [ubuntu-latest, windows-latest, macos-latest] | |
os: [ubuntu-latest] | |
python-version: ["3.8"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18.x" | |
- name: Install dependencies | |
run: | | |
python -m pip install -U codecov | |
npm install -g codecov | |
- name: Test the extension | |
run: | | |
python -m pip install --upgrade -v -e ".[test, examples, docs]" | |
python -m pytest tests/unit | |
yarn run test | |
- name: Linting | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
yarn run lint:check | |
pip install ruff | |
ruff check . | |
- name: Package | |
run: | | |
python -m pip install build | |
python -m build . | |
- name: Upload builds | |
uses: actions/upload-artifact@v3 | |
with: | |
name: buckaroo-dist-${{ github.run_number }} | |
path: | | |
./dist | |
./js/*.tgz | |
- name: Check docs can be build + links | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
working-directory: docs | |
run: | | |
sudo apt install -y pandoc | |
pip install pytest-check-links | |
make html | |
python -m pytest --check-links | |
ui-test: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: buckaroo-dist-${{ github.run_number }} | |
- name: Install Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Setup buckaroo ui test | |
run: pip install `echo dist/*.whl`[ui-test] -r requirements-ui-test.txt | |
- name: Install playwright browsers | |
run: playwright install chromium | |
- name: Run ui-tests | |
run: SOLARA_TEST_RUNNERS=jupyter_lab pytest tests/ui/ --video=retain-on-failure | |
- name: Upload Test artifacts | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: buckaroo-test-results-${{ github.run_number }} | |
path: test-results |