Skip to content

Merge pull request #4 from lovetox/main #61

Merge pull request #4 from lovetox/main

Merge pull request #4 from lovetox/main #61

Workflow file for this run

name: Test
on:
push:
pull_request:
types: [opened, synchronize]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8]
poetry-version: [1.1.6]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Get full python version
id: full-python-version
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Set up cache
uses: actions/cache@v1
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
- name: Install Dependencies
run: poetry install
- name: Test
run: poetry run coverage run --source dbml_sqlite -m pytest
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry run coveralls --service=github
touch_readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Convert README
run:
for i in {1..3}; do sed -i '$d' README.md; done && echo -e '\n\n' >> README.md && date >> README.md && git config --global user.name 'Dave VanderWeele' && git config --global user.email 'weele.me@gmail.com' && git add . && git commit -m "GitHub CI Touched README.md" && git push