diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8b99fe290..3c6a6eaf8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,7 +27,6 @@ env: IMAGE_REGISTRY: "quay.io" IMAGE_TAG: "ci" DOCKERCMD: "podman" - DRIVER: "container" defaults: run: shell: bash @@ -109,17 +108,21 @@ jobs: - name: Run unit tests run: make test - drenv-test: - name: drenv tests - runs-on: ubuntu-22.04 + drenv-linux: + name: drenv strategy: matrix: + os: + - ubuntu-22.04 python-version: - "3.9" - "3.10" - "3.11" - "3.12" - "3.13-dev" + runs-on: ${{ matrix.os }} + env: + DRIVER: "container" steps: - name: Checkout source uses: actions/checkout@v4 @@ -178,17 +181,72 @@ jobs: run: make clean working-directory: test - ramenctl-test: - name: ramenctl tests - runs-on: ubuntu-22.04 + drenv-macos: + name: drenv + strategy: + matrix: + os: + # arm64, 3 cpus (M1), 7 GiB RAM, no nested virtalization. + - macos-14 + python-version: + - "3.12" + runs-on: ${{ matrix.os }} + steps: + - name: Checkout ramen + uses: actions/checkout@v4 + + - name: Setup python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install python packages + run: pip install -r requirements.txt + + - name: Enable coverage for child processes + run: cp coverage.pth $(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])') + + - name: Install drenv + run: pip install -e test + + - name: Run flake8 + run: make flake8 + working-directory: test + + - name: Run pylint + run: make pylint + working-directory: test + + - name: Run black + run: make black + working-directory: test + + - name: Run tests + # We cannot run the test cluster on macOS. + run: make unit-test + working-directory: test + + - name: Report test coverage + run: make coverage + working-directory: test + + ramenctl: + name: ramenctl strategy: matrix: + os: + - ubuntu-22.04 python-version: - "3.9" - "3.10" - "3.11" - "3.12" - "3.13-dev" + include: + # arm64, 3 cpus (M1), 7 GiB RAM, no nested virtalization. + - os: macos-14 + python-version: "3.12" + runs-on: ${{ matrix.os }} steps: - name: Checkout source uses: actions/checkout@v4 @@ -198,7 +256,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install tools + - name: Install python packages run: pip install -r requirements.txt - name: Install drenv