Skip to content

Commit c5682ba

Browse files
committed
CAIP-80 added separate workflow for e2e
1 parent d658dd7 commit c5682ba

3 files changed

Lines changed: 71 additions & 13 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,6 @@ jobs:
5454
run: poetry install
5555

5656
- name: Run tests with coverage
57-
env:
58-
TEST_RSA_KEY: ${{ secrets.TEST_RSA_KEY }}
59-
MSG_BOT_USERNAME: ${{ vars.MSG_BOT_USERNAME }}
60-
FEED_BOT_USERNAME: ${{ vars.FEED_BOT_USERNAME }}
61-
STREAM_ID: ${{ vars.STREAM_ID }}
62-
SYMPHONY_HOST: ${{ vars.SYMPHONY_HOST }}
63-
TEST_USER_ID: ${{ vars.TEST_SYM_USER_ID }}
64-
BOT_USER_ID: ${{ vars.BOT_USER_ID }}
6557
run: poetry run pytest
6658
timeout-minutes: 10
6759

.github/workflows/e2e-build.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ "main", "*-rc" ]
6+
pull_request:
7+
branches: [ "main", "*-rc" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [ '3.12' ]
15+
os: [ ubuntu-latest ]
16+
include:
17+
- os: ubuntu-latest
18+
path: ~/.cache/pypoetry/virtualenvs
19+
- os: macos-latest
20+
path: ~/Library/Caches/pypoetry/virtualenvs
21+
- os: windows-latest
22+
path: ~\AppData\Local\pypoetry\Cache\virtualenvs
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Set up Python ${{ matrix.python-version }}
28+
id: setup-python
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Get pip cache dir
34+
id: pip-cache
35+
run: |
36+
echo "::set-output name=dir::$(pip cache dir)"
37+
- name: Cache pip dependencies
38+
uses: actions/cache@v4
39+
with:
40+
path: ${{ steps.pip-cache.outputs.dir }}
41+
key: ${{ runner.os }}-pip-${{ steps.setup-python.outputs.python-version }}
42+
43+
- name: Install Poetry
44+
run: pip install poetry
45+
46+
- name: Cache poetry
47+
uses: actions/cache@v4
48+
with:
49+
path: ${{ matrix.path }}
50+
key: ${{ runner.os }}-poetry-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
51+
restore-keys: |
52+
${{ runner.os }}-poetry-${{ steps.setup-python.outputs.python-version }}-
53+
- name: Install dependencies
54+
run: poetry install
55+
56+
- name: Run e2e tests with coverage
57+
env:
58+
TEST_RSA_KEY: ${{ secrets.TEST_RSA_KEY }}
59+
MSG_BOT_USERNAME: ${{ vars.MSG_BOT_USERNAME }}
60+
FEED_BOT_USERNAME: ${{ vars.FEED_BOT_USERNAME }}
61+
STREAM_ID: ${{ vars.STREAM_ID }}
62+
SYMPHONY_HOST: ${{ vars.SYMPHONY_HOST }}
63+
TEST_USER_ID: ${{ vars.TEST_SYM_USER_ID }}
64+
BOT_USER_ID: ${{ vars.BOT_USER_ID }}
65+
run: poetry run pytest
66+
timeout-minutes: 10
67+

tests/bdk/integration/e2e_test.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
get_test_messages,
1717
messenger_bot_config, send_messages)
1818

19-
pytestmark = pytest.mark.asyncio
20-
21-
22-
pytestmark = pytest.mark.skipif(
19+
pytestmark =[
20+
pytest.mark.asyncio,
21+
pytest.mark.skipif(
2322
not all(
2423
[
2524
STREAM_ID,
@@ -34,7 +33,7 @@
3433
reason="Required environment variables for integration tests are not set "
3534
"(STREAM_ID, MSG_BOT_USERNAME, FEED_BOT_USERNAME, SYMPHONY_HOST, TEST_RSA_KEY, TEST_USER_ID, BOT_USER_ID)",
3635
)
37-
36+
]
3837
NUMBER_OF_MESSAGES = 3
3938

4039

0 commit comments

Comments
 (0)