-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from manics/test-docker-nerdctl
Test docker and nerdctl, upgrade to pytest 8
- Loading branch information
Showing
4 changed files
with
54 additions
and
21 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 |
---|---|---|
|
@@ -6,19 +6,21 @@ on: | |
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- uses: pre-commit/[email protected] | ||
|
||
test: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
# Do not cancel all jobs if one fails | ||
fail-fast: false | ||
matrix: | ||
python_version: ["3.9"] | ||
container_engine: | ||
- podman | ||
repo_type: | ||
# Only test a subset of the repo2docker tests since we're testing podman, | ||
# not the full repo2docker functionality | ||
|
@@ -33,6 +35,19 @@ jobs: | |
# - r | ||
- unit | ||
- venv/default | ||
include: | ||
- python_version: "3.11" | ||
container_engine: docker | ||
repo_type: base | ||
- python_version: "3.11" | ||
container_engine: docker | ||
repo_type: venv/default | ||
- python_version: "3.11" | ||
container_engine: nerdctl | ||
repo_type: base | ||
- python_version: "3.11" | ||
container_engine: nerdctl | ||
repo_type: venv/default | ||
|
||
steps: | ||
- name: Checkout repo | ||
|
@@ -45,6 +60,15 @@ jobs: | |
cache: pip | ||
cache-dependency-path: dev-requirements.txt | ||
|
||
- name: Install nerdctl | ||
if: matrix.container_engine == 'nerdctl' | ||
run: | | ||
NERDCTL_VERSION=1.7.4 | ||
sudo systemctl disable --now docker | ||
curl -sfL https://github.com/containerd/nerdctl/releases/download/v$NERDCTL_VERSION/nerdctl-full-$NERDCTL_VERSION-linux-amd64.tar.gz | sudo tar -zxvf - -C /usr/local | ||
containerd-rootless-setuptool.sh install | ||
containerd-rootless-setuptool.sh install-buildkit | ||
- name: Install | ||
run: | | ||
pip install -r dev-requirements.txt | ||
|
@@ -67,7 +91,11 @@ jobs: | |
done | ||
- name: Run tests | ||
run: pytest -v tests/${{ matrix.repo_type }} | ||
run: | | ||
export CONTAINER_ENGINE=${{ matrix.container_engine }} | ||
which $CONTAINER_ENGINE | ||
$CONTAINER_ENGINE version | ||
pytest -v tests/${{ matrix.repo_type }} | ||
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | ||
publish-pypi: | ||
|
@@ -76,7 +104,7 @@ jobs: | |
# Only publish if other jobs passed | ||
- lint | ||
- test | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
|
@@ -147,7 +175,7 @@ jobs: | |
status_all: | ||
name: Status matrix Test | ||
if: always() | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- lint | ||
- test | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
build==1.0.3 | ||
jupyter-repo2docker==2023.6.0 | ||
pytest==7.4.4 | ||
pytest==8.0.2 | ||
pre-commit==3.6.2 |
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
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