diff --git a/.github/workflows/e2e-tests.yaml b/.github/workflows/e2e-tests.yaml index f6d26de166..e7eb2315dc 100644 --- a/.github/workflows/e2e-tests.yaml +++ b/.github/workflows/e2e-tests.yaml @@ -18,21 +18,30 @@ jobs: with: node-version: '16.15.0' cache: 'pnpm' + - name: cache poetry install + uses: actions/cache@v2 + with: + path: ~/.local + key: poetry-1.8.3-0 + - name: Install Poetry + run: pipx install poetry==1.8.3 - name: Set up Python + id: python uses: actions/setup-python@v4 with: - python-version: '3.9' - cache: 'pip' - - name: Install Poetry - run: pip install poetry + python-version: 3.9 + cache: poetry + cache-dependency-path: backend/poetry.lock + - name: Set Poetry environment + run: poetry -C ./backend env use '${{ steps.python.outputs.python-path }}' + - name: Install Python dependencies + run: poetry -C ./backend install --with tests - name: Install JS dependencies run: pnpm install --no-frozen-lockfile - name: Build UI run: pnpm run buildUi - name: Lint UI run: pnpm run lintUi - - name: Install Python dependencies - run: poetry install -C ./backend --with tests - name: Run tests env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml index a0cd334b27..5df7dc2566 100644 --- a/.github/workflows/mypy.yaml +++ b/.github/workflows/mypy.yaml @@ -10,13 +10,17 @@ jobs: working-directory: ./backend steps: - uses: actions/checkout@v3 + - name: Install Poetry + run: pipx install poetry - name: Set up Python + id: python uses: actions/setup-python@v4 with: - python-version: '3.9' - cache: 'pip' - - name: Install Poetry - run: pip install poetry + python-version: 3.9 + cache: poetry + cache-dependency-path: backend/poetry.lock + - name: Set Poetry environment + run: poetry env use '${{ steps.python.outputs.python-path }}' - name: Install dependencies run: poetry install --with tests --with mypy --with custom-data - name: Run Mypy diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index d36ac99075..26404e5971 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -13,13 +13,17 @@ jobs: working-directory: ./backend steps: - uses: actions/checkout@v3 + - name: Install Poetry + run: pipx install poetry - name: Set up Python + id: python uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - cache: 'pip' - - name: Install Poetry - run: pip install poetry + cache: poetry + cache-dependency-path: backend/poetry.lock + - name: Set Poetry environment + run: poetry env use '${{ steps.python.outputs.python-path }}' - name: Install dependencies run: poetry install --with tests --with mypy --with custom-data - name: Run Pytest