Skip to content

Tests

Tests #9

Workflow file for this run

name: Tests
on:
workflow_dispatch:
jobs:
test1:
runs-on: ubuntu-latest
container: ubuntu:22.04
env:
PIP_ROOT_USER_ACTION: ignore
strategy:
matrix:
python: [3.12.6]
steps:
- uses: actions/checkout@v4
- name: List environment variables
run: printenv
- name: Print Container ID and Environment Variable
run: |
# Get the container ID
container_id=$(cat /proc/self/cgroup | grep "cpu" | sed 's/^.*\///' | tail -n 1)
echo "Container ID used: $container_id"
# Print the environment variable
echo "PRINT PIP_ROOT_USER_ACTION: $PIP_ROOT_USER_ACTION"
- name: Install Docker
run: |
apt-get update
apt-get install -y docker.io
- name: Install lsb-release
run: |
apt-get update
apt-get install -y lsb-release
- name: fix pip issue
run: mkdir -p /github/home/.cache/pip
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Print again
run: |
# Get the container ID
container_id=$(cat /proc/self/cgroup | grep "cpu" | sed 's/^.*\///' | tail -n 1)
echo "Container ID used: $container_id"
# Print the environment variable
echo "PRINT PIP_ROOT_USER_ACTION: $PIP_ROOT_USER_ACTION"
test2:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.12.6]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: 'requirements.txt'