Bump actions/upload-artifact from 3 to 4 #1526
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
pull_request: | |
push: | |
# trying and staging branches are for BORS config | |
branches: | |
- trying | |
- staging | |
- main | |
jobs: | |
cypress-run: | |
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR) | |
# Will still run for each push to bump-meilisearch-v* | |
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v') | |
runs-on: ubuntu-latest | |
services: | |
meilisearch: | |
image: getmeili/meilisearch:latest | |
env: | |
MEILI_MASTER_KEY: 'masterKey' | |
MEILI_NO_ANALYTICS: 'true' | |
ports: | |
- '7700:7700' | |
name: end-to-end-tests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: yarn | |
- name: Install dependencies | |
run: yarn --dev && yarn --cwd ./tests/env/browser | |
- name: Browser tests | |
uses: cypress-io/github-action@v4 | |
with: | |
# Your starting script | |
start: yarn test:browser | |
# Creates and uploads GitHub artifacts in case of failure | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-videos | |
path: cypress/videos | |
integration_tests: | |
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR) | |
# Will still run for each push to bump-meilisearch-v* | |
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v') | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node: ['14', '16', '18'] | |
name: integration-tests (Node.js ${{ matrix.node }}) | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install | |
- name: Build | |
run: yarn run build | |
- name: Run tests | |
run: yarn run test | |
style_tests: | |
name: style-check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: yarn | |
- name: Install dependencies | |
run: yarn --dev | |
- name: Run linter | |
run: yarn run lint |