1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

Merge pull request #904 from kevin1024/fix-ci

Fix CI for error `unshare: write failed /proc/self/uid_map: Operation not permitted` with Ubuntu >=24.04
This commit is contained in:
Sebastian Pipping
2025-01-17 20:49:41 +01:00
committed by GitHub
6 changed files with 13 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ permissions:
jobs: jobs:
codespell: codespell:
name: Check for spelling errors name: Check for spelling errors
runs-on: ubuntu-latest runs-on: ubuntu-24.04
steps: steps:
- name: Checkout - name: Checkout

View File

@@ -7,7 +7,7 @@ on:
jobs: jobs:
validate: validate:
runs-on: ubuntu-latest runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@@ -11,7 +11,7 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-24.04
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -51,6 +51,13 @@ jobs:
pip install codecov '.[tests]' '${{ matrix.urllib3-requirement }}' pip install codecov '.[tests]' '${{ matrix.urllib3-requirement }}'
pip check pip check
- name: Allow creation of user namespaces (e.g. to the unshare command)
run: |
# .. so that we don't get error:
# unshare: write failed /proc/self/uid_map: Operation not permitted
# Idea from https://github.com/YoYoGames/GameMaker-Bugs/issues/6015#issuecomment-2135552784 .
sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0
- name: Run online tests - name: Run online tests
run: ./runtests.sh --cov=./vcr --cov-branch --cov-report=xml --cov-append -m online run: ./runtests.sh --cov=./vcr --cov-branch --cov-report=xml --cov-append -m online

View File

@@ -16,7 +16,7 @@ permissions:
jobs: jobs:
pre_commit_detect_outdated: pre_commit_detect_outdated:
name: Detect outdated pre-commit hooks name: Detect outdated pre-commit hooks
runs-on: ubuntu-latest runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@@ -11,7 +11,7 @@ on:
jobs: jobs:
pre-commit: pre-commit:
name: Run pre-commit name: Run pre-commit
runs-on: ubuntu-latest runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5

View File

@@ -7,7 +7,7 @@ version: 2
# Set the version of Python and other tools you might need # Set the version of Python and other tools you might need
build: build:
os: ubuntu-22.04 os: ubuntu-24.04
tools: tools:
python: "3.12" python: "3.12"