Update Release Workflows (#129) #192
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: Builds | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: ["3.8", "3.11"] | |
include: | |
- os: ubuntu-latest | |
python-version: "3.9" | |
- os: ubuntu-latest | |
python-version: "pypy-3.8" | |
- os: macos-latest | |
python-version: "3.10" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
clean: true | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- name: Display dependency info | |
run: | | |
python --version | |
pip --version | |
conda --version | |
- name: Add SBT launcher | |
run: | | |
mkdir -p $HOME/.sbt/launchers/1.3.12 | |
curl -L -o $HOME/.sbt/launchers/1.3.12/sbt-launch.jar https://repo1.maven.org/maven2/org/scala-sbt/sbt-launch/1.3.12/sbt-launch.jar | |
- name: Install Python dependencies | |
run: | | |
pip install ".[dev]" | |
- name: Log Python dependencies | |
run: | | |
pip freeze | |
- name: Build and install Gateway Provisioners | |
uses: nick-invision/[email protected] | |
with: | |
timeout_minutes: 10 | |
command: | | |
make clean dist install | |
- name: Run unit tests | |
uses: nick-invision/[email protected] | |
with: | |
timeout_minutes: 3 | |
max_attempts: 1 | |
command: | | |
make test | |
check_release: | |
name: Check Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Base Setup | |
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- name: Check Release | |
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
link_check: | |
name: Check Links | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 | |
with: | |
ignore_links: "http://my-gateway-server.com:8888" | |
ignore_glob: "gateway_provisioners/app-support/README.md" | |
build_docs: | |
name: Build Docs | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Base Setup | |
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- name: Build Docs | |
run: make docs | |
lint_checks: | |
name: Lint Checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- run: make lint | |
- run: make typing | |
# Disabled for now, timed out after 20 and 30 minute attempts | |
# test_minimum_versions: | |
# name: Test Minimum Versions | |
# timeout-minutes: 20 | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
# with: | |
# python_version: "3.9" | |
# - uses: jupyterlab/maintainer-tools/.github/actions/install-minimums@v1 | |
# - name: Run the unit tests | |
# run: | | |
# make test | |
make_sdist: | |
name: Make SDist | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- uses: jupyterlab/maintainer-tools/.github/actions/make-sdist@v1 | |
test_sdist: | |
name: Install from SDist and Test | |
runs-on: ubuntu-latest | |
needs: [make_sdist] | |
timeout-minutes: 20 | |
steps: | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@v1 | |
python_tests_check: # This job does nothing and is only used for the branch protection | |
name: Check Jobs | |
if: always() | |
needs: | |
- build | |
- link_check | |
- check_release | |
# - test_minimum_versions | |
- build_docs | |
- lint_checks | |
- test_sdist | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |