Make workflows look better

This commit is contained in:
Ayaz Salikhov
2022-05-01 20:29:30 +03:00
parent 05c4ef42a2
commit 67fed35b2c
8 changed files with 34 additions and 52 deletions

View File

@@ -59,8 +59,6 @@ jobs:
steps:
- name: Clone Main Repo
uses: actions/checkout@v3
with:
path: main
- name: Set Up Python
uses: actions/setup-python@v3
@@ -70,23 +68,22 @@ jobs:
- name: Install Dev Dependencies
run: |
python -m pip install --upgrade pip
make -C main install-dev-env
python -m pip install -r requirements-dev.txt
- name: Build Docker Images
run: make -C main build-all
run: make build-all
env:
# Full logs for CI build
BUILDKIT_PROGRESS: plain
- name: Test Docker Images
run: make -C main test-all
run: make test-all
- name: Clone Wiki
uses: actions/checkout@v3
with:
repository: ${{github.repository}}.wiki
path: wiki
path: ../wiki
- name: Run Post-Build Hooks
id: hook-all
run: make -C main hook-all
run: make hook-all

View File

@@ -74,8 +74,6 @@ jobs:
- name: Clone Main Repo
uses: actions/checkout@v3
with:
path: main
- name: Set Up Python
uses: actions/setup-python@v3
@@ -85,33 +83,32 @@ jobs:
- name: Install Dev Dependencies
run: |
python -m pip install --upgrade pip
make -C main install-dev-env
python -m pip install -r requirements-dev.txt
- name: Build Docker Images
run: make -C main build-all-multi
run: make build-all-multi
env:
# Full logs for CI build
BUILDKIT_PROGRESS: plain
- name: Test Docker Images
run: make -C main test-all
run: make test-all
- name: Clone Wiki
uses: actions/checkout@v3
with:
repository: ${{github.repository}}.wiki
path: wiki
path: ../wiki
- name: Run Post-Build Hooks
id: hook-all
run: make -C main hook-all
run: make hook-all
- name: Push Wiki to GitHub
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.event_name == 'schedule'
uses: stefanzweifel/git-auto-commit-action@49620cd3ed21ee620a48530e81dba0d139c9cb80 # dependabot updates to latest release
with:
commit_message: "Automated wiki publish for ${{github.sha}}"
repository: wiki/
repository: ../wiki/
- name: Login to Docker Hub
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.event_name == 'schedule'
@@ -122,4 +119,4 @@ jobs:
- name: Push Images to DockerHub
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.event_name == 'schedule'
run: make -C main push-all-multi
run: make push-all-multi

View File

@@ -23,13 +23,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone Main Repo
uses: actions/checkout@v3
- name: Fail to show, that we need manually update dockerhub overview page
# Currently, it's impossible to automatically update descriptions
# https://github.com/docker/hub-tool/issues/172
- name: Fail to show, that for now we need to manually update dockerhub overview page 💩
run: exit 1
- name: push README to Dockerhub for base-notebook
- name: Checkout Repo ⚡️
uses: actions/checkout@v3
- name: push README to Dockerhub for base-notebook 🐳
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # dependabot updates to latest release
env:
DOCKER_USER: ${{secrets.DOCKERHUB_USERNAME}}

View File

@@ -17,20 +17,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone Main Repo
- name: Checkout Repo ⚡️
uses: actions/checkout@v3
with:
path: main
- name: Set Up Python
- name: Set Up Python 🐍
uses: actions/setup-python@v3
with:
python-version: 3.x
- name: Install pre-commit
- name: Install pre-commit 📦
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pre-commit
- name: Run pre-commit hooks
run: make -C main pre-commit-all
- name: Run pre-commit hooks
run: make pre-commit-all

View File

@@ -34,21 +34,21 @@ jobs:
contents: write
steps:
- name: Checkout Repo
- name: Checkout Repo ⚡️
uses: actions/checkout@v3
- name: Set Up Python
- name: Set Up Python 🐍
uses: actions/setup-python@v3
with:
python-version: "3.9"
python-version: 3.9
- name: Install Dev Dependencies
- name: Install Doc Dependencies 📦
run: |
python -m pip install --upgrade pip
make install-docs-env
python -m pip install -r requirements-docs.txt
- name: Build Documentation
- name: Build Documentation 📖
run: make docs
- name: Check Documentation URLs
- name: Check Documentation URLs 🔗
run: make linkcheck-docs

View File

@@ -128,24 +128,12 @@ cont-rm-all: ## remove all containers
dev/%: PORT?=8888
dev/%: ## run a foreground container for a stack
docker run -it --rm -p $(PORT):8888 $(DARGS) $(OWNER)/$(notdir $@)
install-dev-env: ## install libraries required to build images and run tests
@pip install -r requirements-dev.txt
docs: ## build HTML documentation
sphinx-build -W --keep-going --color docs/ docs/_build/
linkcheck-docs: ## check broken links
sphinx-build -W --keep-going --color -b linkcheck docs/ docs/_build/
install-docs-env: ## install libraries required to build docs
@pip install -r requirements-docs.txt
hook/%: WIKI_PATH?=../wiki

View File

@@ -13,7 +13,7 @@ This can be achieved by using the generic task used to install all Python develo
```sh
# Install all development dependencies for the project
make install-dev-env
pip install requirements-dev.txt
# It can also be installed directly
pip install pre-commit
```

View File

@@ -7,8 +7,8 @@ We greatly appreciate pull requests that extend the automated tests that vet the
A [GitHub Action workflow](https://github.com/jupyter/docker-stacks/blob/master/.github/workflows/docker.yml)
runs the following commands against pull requests submitted to the `jupyter/docker-stacks` repository:
1. `make -C main build-all-multi` - which builds all the Docker images
2. `make -C main test-all` - which tests the newly created Docker images
1. `make build-all-multi` - which builds all the Docker images
2. `make test-all` - which tests the newly created Docker images
This `make` command builds and then tests every docker image.
We use `pytest` module to run tests on the image.