|
12 | 12 | jobs:
|
13 | 13 | linter:
|
14 | 14 | name: linter
|
15 |
| - runs-on: ubuntu-18.04 |
| 15 | + runs-on: ubuntu-latest |
16 | 16 | steps:
|
17 | 17 | - uses: actions/checkout@v3
|
| 18 | + |
18 | 19 | - name: Install pipenv
|
19 | 20 | run: pipx install pipenv
|
20 |
| - - name: Set up Python 3.8 |
| 21 | + |
| 22 | + - name: Set up Python 3.10 |
21 | 23 | uses: actions/setup-python@v4
|
22 | 24 | with:
|
23 |
| - python-version: 3.8 |
| 25 | + python-version: "3.10" |
24 | 26 | cache: "pipenv"
|
| 27 | + |
25 | 28 | - name: Install dependencies
|
26 | 29 | run: pipenv install --dev
|
| 30 | + |
27 | 31 | - name: Linter with pylint
|
28 | 32 | run: pipenv run pylint scraper
|
29 | 33 |
|
30 | 34 | unit_tests:
|
31 | 35 | strategy:
|
32 | 36 | fail-fast: false
|
33 | 37 | matrix:
|
34 |
| - python-version: [3.8, 3.9] |
| 38 | + python-version: ["3.9", "3.10", "3.11"] |
35 | 39 | name: unit-tests
|
36 |
| - runs-on: ubuntu-18.04 |
| 40 | + runs-on: ubuntu-latest |
37 | 41 | steps:
|
38 | 42 | - uses: actions/checkout@v3
|
| 43 | + |
39 | 44 | - name: Install pipenv
|
40 | 45 | run: pipx install pipenv
|
| 46 | + |
41 | 47 | - name: Set up Python ${{ matrix.python-version }}
|
42 | 48 | uses: actions/setup-python@v4
|
43 | 49 | with:
|
44 | 50 | python-version: ${{ matrix.python-version }}
|
45 | 51 | cache: "pipenv"
|
| 52 | + |
46 | 53 | - name: Install dependencies
|
47 | 54 | run: pipenv install --dev
|
| 55 | + |
48 | 56 | - name: Run tests
|
49 | 57 | run: pipenv run pytest -m "not chromedriver"
|
50 | 58 |
|
51 | 59 | integration_tests:
|
| 60 | + env: |
| 61 | + MEILISEARCH_HOST_URL: "http://127.0.0.1:7700" |
| 62 | + MEILISEARCH_API_KEY: "masterKey" |
52 | 63 | strategy:
|
53 | 64 | fail-fast: false
|
54 | 65 | matrix:
|
55 |
| - python-version: [3.8, 3.9] |
| 66 | + python-version: ["3.9", "3.10", "3.11"] |
56 | 67 | name: integration-tests
|
57 |
| - runs-on: ubuntu-18.04 |
| 68 | + runs-on: ubuntu-latest |
58 | 69 | steps:
|
59 | 70 | - uses: actions/checkout@v3
|
| 71 | + |
60 | 72 | - name: Install pipenv
|
61 | 73 | run: pipx install pipenv
|
| 74 | + |
62 | 75 | - name: Set up Python ${{ matrix.python-version }}
|
63 | 76 | uses: actions/setup-python@v4
|
64 | 77 | with:
|
65 | 78 | python-version: ${{ matrix.python-version }}
|
66 | 79 | cache: "pipenv"
|
| 80 | + |
67 | 81 | - name: Install dependencies for production only
|
68 | 82 | run: pipenv install
|
| 83 | + |
69 | 84 | - name: Meilisearch setup with Docker
|
70 | 85 | run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --no-analytics --master-key=masterKey
|
| 86 | + |
71 | 87 | - name: Run the scraper with basic config
|
72 | 88 | run: pipenv run ./docs_scraper $CONFIG_FILE
|
73 | 89 | env:
|
74 |
| - MEILISEARCH_HOST_URL: "http://127.0.0.1:7700" |
75 |
| - MEILISEARCH_API_KEY: "masterKey" |
76 | 90 | CONFIG_FILE: "tests/config_files_examples/docs-basics.config.json"
|
| 91 | + |
77 | 92 | - name: Run the scraper with custom config
|
78 | 93 | run: pipenv run ./docs_scraper $CONFIG_FILE
|
79 | 94 | env:
|
80 |
| - MEILISEARCH_HOST_URL: "http://127.0.0.1:7700" |
81 |
| - MEILISEARCH_API_KEY: "masterKey" |
82 | 95 | CONFIG_FILE: "tests/config_files_examples/docs-custom.config.json"
|
83 | 96 |
|
84 | 97 | image_build:
|
85 | 98 | name: image-build
|
86 |
| - runs-on: ubuntu-18.04 |
| 99 | + runs-on: ubuntu-latest |
87 | 100 | steps:
|
88 | 101 | - uses: actions/checkout@v3
|
89 | 102 | - name: Build Docker image
|
|
0 commit comments