Skip to content

Better naming

Better naming #91

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python >= 3.8
on:
push:
branches: [ master ]
paths-ignore:
- "**/README.md"
- "**/LICENSE"
- "**/COPYING"
- "stream2segment/resources/traveltimes/**"
pull_request:
branches: [ master ]
paths-ignore:
- "**/README.md"
- "**/LICENSE"
- "**/COPYING"
- "stream2segment/resources/traveltimes/**"
jobs:
build:
# Reminder (commented for the moment):
# here we run if the pull request source is not dev (because for dev we already run this test, see above)
# https://github.com/orgs/community/discussions/30794#discussioncomment-3482788
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
# if: ${{ github.head_ref || github.ref_name }} != 'dev'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
# service containers to run with `postgres-job`
services:
# label used to access the service container
postgres:
# Docker Hub image
image: postgres:latest
# service environment variables
env:
# The hostname used to communicate with the PostgreSQL service container
POSTGRES_HOST: localhost
# optional (defaults to `postgres`)
POSTGRES_DB: s2s_test
# required
POSTGRES_PASSWORD: postgres
# optional (defaults to `5432`)
POSTGRES_PORT: 5432
# optional (defaults to `postgres`)
POSTGRES_USER: postgres
ports:
# maps tcp port 5432 on service container to the host
- 5432:5432
# set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip setuptools wheel
pip install -r requirements.dev.txt
pip install jupyterlab
pip install .
- name: Test with pytest
run: |
pytest -xvvv --dburl postgresql://postgres:postgres@localhost/s2s_test