From f0773f2d01420bffe929933727fb538d771ef08b Mon Sep 17 00:00:00 2001 From: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Date: Sun, 25 Jun 2023 03:44:03 -0400 Subject: [PATCH] chore: add more test matrices (#70) --- .github/workflows/ci.yml | 14 ++++++++++---- hatch.toml | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8159dcfb..7e6d0b7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,7 @@ env: COLUMNS: 120 OPENLLM_DO_NOT_TRACK: True PYTHONUNBUFFERED: '1' + STABLE_PYTHON_VERSION: '3.11' # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun defaults: run: @@ -36,24 +37,27 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - name: tests-${{ matrix.os }} + python-version: ['3.8', '3.9', '3.10', '3.11'] + name: tests-${{ matrix.os }}-${{ matrix.python-version }} steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Setup CI uses: ./.github/actions/setup-repo + with: + python-version: ${{ matrix.python-version }} - name: Run tests run: hatch run test:full - name: Disambiguate coverage filename - run: mv .coverage ".coverage.${{ matrix.os }}" + run: mv .coverage ".coverage.${{ matrix.os }}.${{ matrix.python-version }}" - name: Upload coverage data uses: actions/upload-artifact@v3 with: name: coverage-data path: .coverage.* coverage: - name: Coverage + name: report-coverage runs-on: ubuntu-latest needs: - tests @@ -63,6 +67,8 @@ jobs: fetch-depth: 0 - name: Setup CI uses: ./.github/actions/setup-repo + with: + python-version: ${{ env.STABLE_PYTHON_VERSION }} - name: Download coverage data uses: actions/download-artifact@v3 with: @@ -99,5 +105,5 @@ jobs: with: jobs: ${{ toJSON(needs) }} concurrency: - group: ci-${{ github.event.pull_request.number || github.sha }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true diff --git a/hatch.toml b/hatch.toml index 896b7d33..b72d4639 100644 --- a/hatch.toml +++ b/hatch.toml @@ -18,6 +18,7 @@ setup = "pre-commit install" typing = "pyright {args:src/openllm tests}" [envs.test] dependencies = [ + "openllm[all]", # NOTE: Tests strategies with Hypothesis and pytest, and snapshot testing with syrupy "coverage[toml]>=6.5", "lxml",