diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d4eaafb95..5ad948a3c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -32,12 +32,15 @@ jobs: pipx install poetry==$POETRY_VERSION - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 + id: setup-python with: python-version: ${{ matrix.python-version }} cache: poetry - - name: Install dependencies + - name: Install Python dependencies run: | + poetry env use ${{ matrix.python-version }} poetry install + if: ${{ steps.setup-python.outputs.cache-hit != 'true' }} - name: Analysing the code with our lint run: | make lint diff --git a/.github/workflows/python_test.yml b/.github/workflows/python_test.yml index 629633f23..a04a208f3 100644 --- a/.github/workflows/python_test.yml +++ b/.github/workflows/python_test.yml @@ -33,11 +33,15 @@ jobs: run: pipx install poetry==$POETRY_VERSION - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 + id: setup-python with: python-version: ${{ matrix.python-version }} cache: "poetry" - - name: Install dependencies - run: poetry install + - name: Install Python dependencies + run: | + poetry env use ${{ matrix.python-version }} + poetry install + if: ${{ steps.setup-python.outputs.cache-hit != 'true' }} - name: Run unit tests run: | make tests diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 4a70c2300..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: test - -on: - push: - branches: [main] - paths: - - "poetry.lock" - - "pyproject.toml" - - "src/backend/**" - pull_request: - branches: [dev] - paths: - - "poetry.lock" - - "pyproject.toml" - - "src/backend/**" - -env: - POETRY_VERSION: "1.8.2" - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: - - "3.10" - - "3.11" - env: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - steps: - - uses: actions/checkout@v4 - - name: Install poetry - run: pipx install poetry==$POETRY_VERSION - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: "poetry" - - name: Install dependencies - run: | - poetry env use ${{ matrix.python-version }} - poetry install - - name: Run unit tests - run: | - make tests