Skip to content

Commit

Permalink
Merge pull request #437 from blink1073/upgrade-releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Oct 10, 2022
2 parents b5bf5ea + 1370c9c commit b4df728
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 109 deletions.
112 changes: 12 additions & 100 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
Expand All @@ -21,23 +20,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '14.x'

# Cache yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn
uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install dependencies
shell: bash
Expand All @@ -61,23 +44,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '14.x'

# Cache yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn
uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install dependencies
shell: bash
Expand Down Expand Up @@ -126,75 +93,20 @@ jobs:
git commit -a -m "Update versions"
yarn run publish
check_release:
check_links:
runs-on: ubuntu-latest
strategy:
matrix:
group: [check_release, link_check]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '14.x'

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.9
architecture: "x64"

# Cache pip
- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
shell: bash

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ steps.get-date.outputs.date }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-pip-
# Cache yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn
uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Cache checked links
if: ${{ matrix.group == 'link_check' }}
uses: actions/cache@v3
- uses: actions/checkout@v2
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
with:
path: ~/.cache/pytest-link-check
key: ${{ runner.os }}-linkcheck-${{ hashFiles('**/*.md') }}-md-links
restore-keys: |
${{ runner.os }}-linkcheck-
ignore_links: "./api/index.html examples/accordionpanel/index.html examples/datagrid/index.html examples/dockpanel/index.html"

check_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check Release
if: ${{ matrix.group == 'check_release' }}
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run Link Check
if: ${{ matrix.group == 'link_check' }}
uses: jupyter-server/jupyter_releaser/.github/actions/check-links@v1
9 changes: 0 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,7 @@
"typescript": "~4.7.3"
},
"jupyter-releaser": {
"skip": [
"check-links"
],
"options": {
"ignore-links": [
"./api/index.html",
"examples/accordionpanel/index.html",
"examples/datagrid/index.html",
"examples/dockpanel/index.html"
],
"npm-cmd": "npm publish --tag next"
},
"hooks": {
Expand Down

0 comments on commit b4df728

Please sign in to comment.