-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
|
||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
HATCH_VERSION: "1.7.0" | ||
PYTHON_VERSION: "3.9" | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Hatch | ||
run: pipx install hatch==${{ env.HATCH_VERSION }} | ||
|
||
- name: Set up Python with pip cache | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Check Formatting (Black) | ||
run: hatch run black datalogger_jupyterlab --check | ||
|
||
- name: Lint (Flake8) | ||
run: hatch run flake8 datalogger_jupyterlab | ||
|
||
- name: Lint (Pylint) | ||
run: hatch run pylint datalogger_jupyterlab | ||
|
||
- name: Type Check (Mypy) | ||
run: hatch run mypy datalogger_jupyterlab |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: workflow_dispatch | ||
|
||
env: | ||
HATCH_VERSION: "1.7.0" | ||
PYTHON_VERSION: "3.9" | ||
JUPYTERLAB_DISPLAY_NAME_VERSION: "0.1.0" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Hatch | ||
run: pipx install hatch==${{ env.HATCH_VERSION }} | ||
|
||
- name: Set up Python with pip cache | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Build package | ||
run: hatch build | ||
|
||
- name: Create _site/releases/index.html | ||
run: | | ||
mkdir _site | ||
mkdir _site/releases | ||
echo '<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<a href="jupyterlab-display-name/">jupyterlab-display-name</a> | ||
</body> | ||
</html>' > _site/releases/index.html | ||
- name: Create _site/releases/jupyterlab-display-name/index.html | ||
run: | | ||
mkdir _site/releases/jupyterlab-display-name | ||
echo '<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<a href="jupyterlab_display_names-${{ env.JUPYTERLAB_DISPLAY_NAME_VERSION }}-py3-none-any.whl"> | ||
jupyterlab_display_names-${{ env.JUPYTERLAB_DISPLAY_NAME_VERSION }}-py3-none-any.whl | ||
</a> | ||
<a href="jupyterlab_display_names-${{ env.JUPYTERLAB_DISPLAY_NAME_VERSION }}.tar.gz">jupyterlab_display_names-${{ env.JUPYTERLAB_DISPLAY_NAME_VERSION }}.tar.gz</a> | ||
</body> | ||
</html>' > _site/releases/jupyterlab-display-name/index.html | ||
- name: Move package files into _site/releases/jupyterlab-display-name | ||
run: mv dist/* _site/releases/jupyterlab-display-name | ||
|
||
- name: Upload site artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
|
||
deploy: | ||
needs: build | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |