|
1 | 1 | # Testing the code base against the Meilisearch pre-releases |
2 | 2 | name: Pre-Release Tests |
3 | 3 |
|
4 | | -# Will only run for PRs and pushes to bump-meilisearch-v* |
| 4 | +# # Will only run for PRs and pushes to bump-meilisearch-v* |
5 | 5 | on: |
6 | 6 | push: |
7 | 7 | branches: [bump-meilisearch-v*] |
8 | 8 | pull_request: |
9 | 9 | branches: [bump-meilisearch-v*] |
10 | 10 |
|
11 | 11 | jobs: |
| 12 | + meilisearch-version: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + outputs: |
| 15 | + version: ${{ steps.grep-step.outputs.version }} |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v3 |
| 18 | + - name: Grep docker beta version of Meilisearch |
| 19 | + id: grep-step |
| 20 | + run: | |
| 21 | + MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | sh) |
| 22 | + echo $MEILISEARCH_VERSION |
| 23 | + echo ::set-output name=version::$MEILISEARCH_VERSION |
12 | 24 | integration_tests: |
13 | 25 | runs-on: ubuntu-latest |
| 26 | + needs: ['meilisearch-version'] |
| 27 | + services: |
| 28 | + meilisearch: |
| 29 | + image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }} |
| 30 | + env: |
| 31 | + MEILI_MASTER_KEY: 'masterKey' |
| 32 | + MEILI_NO_ANALYTICS: 'true' |
| 33 | + ports: |
| 34 | + - '7700:7700' |
14 | 35 | strategy: |
15 | 36 | matrix: |
16 | | - node: ["12", "14", "16"] |
17 | | - name: integration-tests-against-rc (Node.js ${{ matrix.node }}) |
| 37 | + node: ['14', '16', '18'] |
| 38 | + name: integration-tests (Node.js ${{ matrix.node }}) |
18 | 39 | steps: |
19 | | - - uses: actions/checkout@v2 |
20 | | - - name: Cache dependencies |
21 | | - uses: actions/cache@v2 |
22 | | - with: |
23 | | - path: | |
24 | | - ./node_modules |
25 | | - key: ${{ hashFiles('yarn.lock') }} |
| 40 | + - uses: actions/checkout@v3 |
26 | 41 | - name: Setup node |
27 | | - uses: actions/setup-node@v2 |
| 42 | + uses: actions/setup-node@v3 |
28 | 43 | with: |
29 | 44 | node-version: ${{ matrix.node }} |
30 | | - - name: print version |
31 | | - run: node -v |
| 45 | + cache: yarn |
32 | 46 | - name: Install dependencies |
33 | 47 | run: yarn --dev |
34 | | - - name: Get the latest Meilisearch RC |
35 | | - run: echo "MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | bash)" >> $GITHUB_ENV |
36 | | - - name: Meilisearch (${{ env.MEILISEARCH_VERSION }}) setup with Docker |
37 | | - run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ env.MEILISEARCH_VERSION }} meilisearch --master-key=masterKey --no-analytics |
38 | 48 | - name: Run tests |
39 | 49 | run: yarn test |
40 | 50 | - name: Build project |
|
47 | 57 | run: yarn test:env:node-ts |
48 | 58 | - name: Run Browser env |
49 | 59 | run: yarn test:env:browser |
50 | | - |
51 | | - linter_check: |
52 | | - runs-on: ubuntu-latest |
53 | | - name: linter-check |
54 | | - steps: |
55 | | - - uses: actions/checkout@v2 |
56 | | - - name: Cache dependencies |
57 | | - uses: actions/cache@v2 |
58 | | - with: |
59 | | - path: | |
60 | | - ./node_modules |
61 | | - key: ${{ hashFiles('yarn.lock') }} |
62 | | - - name: Setup node |
63 | | - uses: actions/setup-node@v2 |
64 | | - - name: Install dependencies |
65 | | - run: yarn --dev |
66 | | - - name: Run style check |
67 | | - run: yarn style |
68 | | - - name: yaml-lint |
69 | | - uses: ibiqlik/action-yamllint@v3 |
70 | | - with: |
71 | | - config_file: .yamllint.yml |
72 | | - |
73 | | - types_check: |
74 | | - runs-on: ubuntu-latest |
75 | | - name: types-check |
76 | | - steps: |
77 | | - - uses: actions/checkout@v2 |
78 | | - - name: Cache dependencies |
79 | | - uses: actions/cache@v2 |
80 | | - with: |
81 | | - path: | |
82 | | - ./node_modules |
83 | | - key: ${{ hashFiles('yarn.lock') }} |
84 | | - - name: Setup node |
85 | | - uses: actions/setup-node@v2 |
86 | | - - name: Install dependencies |
87 | | - run: yarn --dev |
88 | | - - name: Build project |
89 | | - run: yarn build |
90 | | - - name: Run types check |
91 | | - run: yarn types |
0 commit comments