From 65822cc773f9565525f0339018ca2e7422c6015b Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 4 Feb 2024 13:28:11 +0000 Subject: [PATCH] CI: Add both MacOS and Windows tests --- .github/workflows/ci.yml | 2 +- .github/workflows/ci_win.yml | 72 ++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci_win.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67741b2c5..a71b138de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: test_env: name: test_environments - runs-on: "ubuntu-latest" + runs-on: [ "ubuntu-latest", "macos-latest" ] strategy: fail-fast: false timeout-minutes: 10 diff --git a/.github/workflows/ci_win.yml b/.github/workflows/ci_win.yml new file mode 100644 index 000000000..64ec04ffa --- /dev/null +++ b/.github/workflows/ci_win.yml @@ -0,0 +1,72 @@ +name: Windows CI + +on: [push, pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: test + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["windows-latest"] + python-version: ["3.7"] + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Python version ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: pyproject.toml + + - name: Install and test + shell: pwsh + run: | + python.exe -m pip install .[test] + python.exe -m pip install packaging virtualenv + python.exe -m pytest -v -l -x --timeout=300 --durations=100 test --environment-type=virtualenv + + + test_env: + name: test_environments + runs-on: "ubuntu-latest" + strategy: + fail-fast: false + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: mamba-org/setup-micromamba@v1 + with: + init-shell: >- + powershell + environment-name: test-env + cache-environment: true + create-args: >- + python + pip + libmambapy + conda-build + + - name: Install dependencies + run: python -m pip install ".[test,hg]" --pre + shell: micromamba-shell {0} + + - name: Install asv + run: pip install . + shell: micromamba-shell {0} + + - name: Run tests + run: pytest -k environment_bench -vvvvv + shell: micromamba-shell {0}