diff --git a/.github/workflows/compatibility-test.yml b/.github/workflows/compatibility-test.yml new file mode 100644 index 0000000..5d15996 --- /dev/null +++ b/.github/workflows/compatibility-test.yml @@ -0,0 +1,69 @@ +name: Linux Compatibility Test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + test: + name: Test on ${{ matrix.container }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + container: [ + 'ubuntu:latest', + 'ubuntu:20.04', + 'debian:latest', + 'debian:stable', + 'centos:7', + 'fedora:latest', + 'opensuse/leap:latest', + 'archlinux:latest' + ] + + container: + image: ${{ matrix.container }} + + env: + BOT_TOKEN: ${{ secrets.TEST_BOT_TOKEN }} + CHAT_ID: ${{ secrets.TEST_CHAT_ID }} + OVH_ENDPOINT: ovh-eu + OVH_APPLICATION_KEY: ${{ secrets.TEST_OVH_APPLICATION_KEY }} + OVH_APPLICATION_SECRET: ${{ secrets.TEST_OVH_APPLICATION_SECRET }} + OVH_CONSUMER_KEY: ${{ secrets.TEST_OVH_CONSUMER_KEY }} + + steps: + - uses: actions/checkout@v3 + + - name: Install basic dependencies + run: | + if [ -f /etc/debian_version ]; then + apt-get update + apt-get install -y curl sudo + elif [ -f /etc/redhat-release ]; then + yum install -y curl sudo + elif [ -f /etc/arch-release ]; then + pacman -Sy --noconfirm curl sudo + elif [ -f /etc/opensuse-release ]; then + zypper install -y curl sudo + fi + + - name: Test script installation + run: | + chmod +x ovh_shell.sh + echo -e "\n\n\n\n\n\n" | ./ovh_shell.sh || exit 1 + + - name: Verify Python environment + run: | + source venv/bin/activate + python -c "import ovh; import requests" || exit 1 + deactivate + + - name: Report status + if: always() + run: | + echo "Test completed on ${{ matrix.container }}" \ No newline at end of file