Bump tokio from 1.39.2 to 1.41.0 #291
Workflow file for this run
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
# Syntax reference: | |
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions | |
name: Test | |
defaults: | |
run: | |
shell: bash | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
testing: | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ matrix.container }} | |
# docker blocks the unshare syscall by default | |
options: '--privileged' | |
strategy: | |
matrix: | |
# this CI testing can't test the different kernel versions that these distributions use, | |
# but this is better than nothing | |
container: ['ubuntu:20.04', 'ubuntu:22.04', 'debian:11-slim', 'debian:12-slim'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install Dependencies | |
run: | | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get install -y curl clang | |
- name: Add User | |
run: | | |
useradd --create-home user | |
chown -R user:user . | |
- name: Install Rust | |
shell: su user {0} | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --profile=minimal | |
- name: Container Info | |
shell: su user {0} | |
run: | | |
pwd | |
id -u | |
cat /proc/sys/kernel/unprivileged_userns_clone || true | |
- name: Build | |
shell: su user {0} | |
run: | | |
. $HOME/.cargo/env | |
cargo build | |
- name: Run | |
shell: su user {0} | |
run: | | |
. $HOME/.cargo/env | |
# curl should fail due to the isolated network namespace and exit with code 6 | |
RUST_LOG=debug RUST_BACKTRACE=1 cargo run curl -s google.com ; RV="$?" | |
[ "$RV" = "6" ] |