forked from saleor/saleor
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (70 loc) · 2.17 KB
/
e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: e2e suite
on:
workflow_dispatch:
schedule:
# At 2:00 AM UTC on Monday, Wednesday, and Friday
- cron: "00 2 * * 1,3,5"
pull_request:
types: [opened, synchronize, reopened]
paths:
- "**.py"
- Dockerfile
- "saleor/**"
- ".github/workflows/e2e.yml"
- pyproject.toml
- poetry.lock
env:
DATABASE_URL: "postgres://saleor:saleor@postgres:5432/saleor"
SECRET_KEY: ci-test
jobs:
build:
runs-on: ubuntu-22.04
container: python:3.9
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: saleor
POSTGRES_USER: saleor
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
apt-get install -y libpq-dev
- name: Install and configure poetry
run: |
pip install poetry==1.7.0
- name: Cache the venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
poetry env use python3.9
poetry install --no-root
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Add Python Virtual Environment to PATH
run: |
# Note: requires `poetry env use` to be ran, otherwise poetry
# may not be able to find which virtual environment is in use.
# Ticket: https://github.com/python-poetry/poetry/issues/7190
echo "$(poetry env info -p)"/bin >> $GITHUB_PATH
- name: Run E2E tests
run: |
pytest -m "e2e" --junit-xml=e2e-test-results.xml
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@4c22f3314dfc484aaad53353d3dd8dddf5de6b46 # v0.5.0
with:
path: e2e-test-results.xml
summary: true
display-options: fEX
fail-on-empty: true
title: E2E core test results