mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
Create test.yml
This commit is contained in:
parent
d220867392
commit
0224e0be68
43
.github/workflows/test.yml
vendored
Normal file
43
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Tests
|
||||
|
||||
# Controls when the action will run.
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
# Label of the container job
|
||||
container-job:
|
||||
# Containers must run in Linux based operating systems
|
||||
runs-on: ubuntu-latest
|
||||
# Docker Hub image that `container-job` executes in
|
||||
container: python:3.7-slim-buster
|
||||
|
||||
# Service containers to run with `container-job`
|
||||
services:
|
||||
# Label used to access the service container
|
||||
postgres:
|
||||
# Docker Hub image
|
||||
image: postgres
|
||||
# Provide the password for postgres
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
# Set health checks to wait until postgres has started
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
- name: Run tests
|
||||
run: pytest --cov=project
|
||||
env:
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
Loading…
x
Reference in New Issue
Block a user