forked from cgwire/zou
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[github-actions] do tests on github-actions
- Loading branch information
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
name: Zou CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
ci: | ||
name: Test with different versions of Python 🐍 | ||
runs-on: ubuntu-22.04 | ||
env: | ||
INDEXER_KEY: "testkey0123456789" | ||
strategy: | ||
matrix: | ||
version: [3.8, 3.11] | ||
container: ${{ matrix.container }} | ||
services: | ||
postgres: | ||
image: postgres | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_PORT: 5432 | ||
steps: | ||
- name: Create database 🗄 | ||
run: >- | ||
PGPASSWORD=postgres psql -c 'create database zoudb;' -U postgres -h 127.0.0.1 -p 5432 | ||
- uses: actions/checkout@v3 | ||
- name: Install ffmpeg | ||
run: sudo apt-get install -y ffmpeg | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.version }} | ||
- name: Upgrade pip 📦 | ||
run: >- | ||
pip install --upgrade pip setuptools | ||
- name: Install packages 📦 | ||
run: >- | ||
pip install -r requirements.txt | ||
- name: Launch docker for meilisearch 🐳 | ||
run: | | ||
docker pull getmeili/meilisearch:v1.1 | ||
docker run -it --rm -d -p 7700:7700 -e MEILI_MASTER_KEY=$INDEXER_KEY getmeili/meilisearch:v1.1 | ||
- name: Run tests 🧪 | ||
run: >- | ||
py.test |