Skip to content

Commit 4d19848

Browse files
meili-bors[bot]brunoocasalialallema
authored
Merge #292
292: Enhancement/Action tests r=alallema a=brunoocasali Fixes #290 I think we can keep the last three minor releases of Python. This PR adds those last three minors to `unit_tests` and `integration_tests` actions. The linter action runs only against the python version we have in the final docker image. Co-authored-by: Bruno Casali <[email protected]> Co-authored-by: Amélie <[email protected]>
2 parents b2f4e2a + 9003892 commit 4d19848

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

.github/workflows/tests.yml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,78 +12,91 @@ on:
1212
jobs:
1313
linter:
1414
name: linter
15-
runs-on: ubuntu-18.04
15+
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18+
1819
- name: Install pipenv
1920
run: pipx install pipenv
20-
- name: Set up Python 3.8
21+
22+
- name: Set up Python 3.10
2123
uses: actions/setup-python@v4
2224
with:
23-
python-version: 3.8
25+
python-version: "3.10"
2426
cache: "pipenv"
27+
2528
- name: Install dependencies
2629
run: pipenv install --dev
30+
2731
- name: Linter with pylint
2832
run: pipenv run pylint scraper
2933

3034
unit_tests:
3135
strategy:
3236
fail-fast: false
3337
matrix:
34-
python-version: [3.8, 3.9]
38+
python-version: ["3.9", "3.10", "3.11"]
3539
name: unit-tests
36-
runs-on: ubuntu-18.04
40+
runs-on: ubuntu-latest
3741
steps:
3842
- uses: actions/checkout@v3
43+
3944
- name: Install pipenv
4045
run: pipx install pipenv
46+
4147
- name: Set up Python ${{ matrix.python-version }}
4248
uses: actions/setup-python@v4
4349
with:
4450
python-version: ${{ matrix.python-version }}
4551
cache: "pipenv"
52+
4653
- name: Install dependencies
4754
run: pipenv install --dev
55+
4856
- name: Run tests
4957
run: pipenv run pytest -m "not chromedriver"
5058

5159
integration_tests:
60+
env:
61+
MEILISEARCH_HOST_URL: "http://127.0.0.1:7700"
62+
MEILISEARCH_API_KEY: "masterKey"
5263
strategy:
5364
fail-fast: false
5465
matrix:
55-
python-version: [3.8, 3.9]
66+
python-version: ["3.9", "3.10", "3.11"]
5667
name: integration-tests
57-
runs-on: ubuntu-18.04
68+
runs-on: ubuntu-latest
5869
steps:
5970
- uses: actions/checkout@v3
71+
6072
- name: Install pipenv
6173
run: pipx install pipenv
74+
6275
- name: Set up Python ${{ matrix.python-version }}
6376
uses: actions/setup-python@v4
6477
with:
6578
python-version: ${{ matrix.python-version }}
6679
cache: "pipenv"
80+
6781
- name: Install dependencies for production only
6882
run: pipenv install
83+
6984
- name: Meilisearch setup with Docker
7085
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --no-analytics --master-key=masterKey
86+
7187
- name: Run the scraper with basic config
7288
run: pipenv run ./docs_scraper $CONFIG_FILE
7389
env:
74-
MEILISEARCH_HOST_URL: "http://127.0.0.1:7700"
75-
MEILISEARCH_API_KEY: "masterKey"
7690
CONFIG_FILE: "tests/config_files_examples/docs-basics.config.json"
91+
7792
- name: Run the scraper with custom config
7893
run: pipenv run ./docs_scraper $CONFIG_FILE
7994
env:
80-
MEILISEARCH_HOST_URL: "http://127.0.0.1:7700"
81-
MEILISEARCH_API_KEY: "masterKey"
8295
CONFIG_FILE: "tests/config_files_examples/docs-custom.config.json"
8396

8497
image_build:
8598
name: image-build
86-
runs-on: ubuntu-18.04
99+
runs-on: ubuntu-latest
87100
steps:
88101
- uses: actions/checkout@v3
89102
- name: Build Docker image

0 commit comments

Comments
 (0)