From 1fdfa396223b30646ba14d6709e6e9c7ed511b08 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 9 Mar 2022 05:31:25 -0600 Subject: [PATCH] clean up ci --- .github/workflows/build.yml | 9 ++++--- .github/workflows/buildutils.yml | 7 ++++-- .github/workflows/check-release.yml | 27 ++++++++++---------- .github/workflows/docs.yml | 39 ++++++++--------------------- .github/workflows/ui-tests.yml | 11 ++++++-- 5 files changed, 44 insertions(+), 49 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d1ce2f14..d117bf884 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,16 +2,17 @@ name: Build on: push: - branches: - - '*' + branches: ['main'] pull_request: - branches: - - '*' permissions: contents: write +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + env: PIP_DISABLE_PIP_VERSION_CHECK: 1 diff --git a/.github/workflows/buildutils.yml b/.github/workflows/buildutils.yml index d915f884e..abdfa98ed 100644 --- a/.github/workflows/buildutils.yml +++ b/.github/workflows/buildutils.yml @@ -2,14 +2,17 @@ name: Build Utilities on: push: - branches: '*' + branches: ['main'] pull_request: - branches: '*' defaults: run: shell: bash -l {0} +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: versioning: runs-on: ubuntu-latest diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index e08cceefe..bfcdf9b2e 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -1,36 +1,37 @@ name: Check Release on: push: - branches: - - "*" + branches: ["main"] pull_request: - branches: - - "*" permissions: contents: write +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: check_release: runs-on: ubuntu-latest + strategy: + matrix: + group: [check_release, link_check] + fail-fast: false steps: - name: Checkout uses: actions/checkout@v2 - - name: Base Setup uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - - - name: Upgrade packaging dependencies - run: | - pip install --upgrade jupyter-packaging~=0.10 --user - - name: Install Dependencies run: | - pip install . - + pip install -e . - name: Check Release + if: ${{ matrix.group == 'check_release' }} uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - version_spec: next + - name: Check Links + if: ${{ matrix.group == 'link_check' }} + uses: jupyter-server/jupyter_releaser/.github/actions/check-links@v1 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0f0faba1e..a2f617d45 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,40 +1,23 @@ name: Docs Tests on: push: - branches: '*' + branches: ['main'] pull_request: - branches: '*' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: build: - runs-on: ${{ matrix.os }}-latest - strategy: - fail-fast: false - matrix: - os: [ubuntu] - python-version: [ '3.7' ] + runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v1 - - name: Install Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/checkout@v2 + - name: Base Setup + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 with: - python-version: ${{ matrix.python-version }} - architecture: 'x64' - - name: Upgrade packaging dependencies - run: | - pip install --upgrade pip setuptools wheel - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - name: Cache pip - uses: actions/cache@v1 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }} - restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }}- - ${{ runner.os }}-pip- + python_version: '3.7' - name: Install the Python dependencies run: | pip install -e .[test] codecov diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index 7428a6f1d..79217cfe0 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -1,6 +1,13 @@ name: UI Tests -on: [push, pull_request] +on: + push: + branches: ["main"] + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true jobs: build: @@ -97,4 +104,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: notebook-${{ matrix.browser }}-updated-snapshots - path: ui-tests/test \ No newline at end of file + path: ui-tests/test