Skip to content

Commit

Permalink
Merge pull request #16 from renefritze/minimal_ci
Browse files Browse the repository at this point in the history
setup minimal ci test
  • Loading branch information
renefritze committed Dec 28, 2021
2 parents 0144970 + 5cce46c commit 31e3e42
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 29 deletions.
4 changes: 4 additions & 0 deletions .ci/requirements.txt
@@ -0,0 +1,4 @@
pip
wheel
pytest
typer
12 changes: 10 additions & 2 deletions .github/workflows/build.yml
Expand Up @@ -2,13 +2,16 @@ name: build

on: [push, pull_request]


jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.9"]

env:
# cache busting if requirements haven't changed
CACHE_EPOCH: 0
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -23,7 +26,7 @@ jobs:
uses: actions/cache@v2.1.7
with:
path: .venv
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
key: venv-${{ env.CACHE_EPOCH }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
Expand All @@ -40,3 +43,8 @@ jobs:
- name: Run safety checks
run: |
make check-safety
- name: Check self requirements
run: |
poetry run pip install -r requirements.txt
poetry run check_reqs requirements.txt
23 changes: 23 additions & 0 deletions .github/workflows/git_checks.yml
@@ -0,0 +1,23 @@
on: pull_request

name: Git

jobs:
message-check:
name: Block Autosquash Commits
runs-on: ubuntu-latest
steps:
- name: Block Autosquash Commits
uses: xt0rted/block-autosquash-commits-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

merge_conflict_job:
runs-on: ubuntu-latest
name: Find merge conflicts
steps:
# Checkout the source code so we have some files to look at.
- uses: actions/checkout@v2
# Run the actual merge conflict finder
- name: Merge Conflict finder
uses: olivernybroe/action-conflict-finder@v2.0
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Expand Up @@ -4,7 +4,7 @@ on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main

jobs:
update_release_draft:
Expand Down
4 changes: 2 additions & 2 deletions assets/images/coverage.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion check_reqs/__main__.py
@@ -1,7 +1,6 @@
# type: ignore[attr-defined]
from enum import Enum
from pathlib import Path
from random import choice

import typer
from rich.console import Console
Expand Down
23 changes: 0 additions & 23 deletions tests/test_example/test_hello.py

This file was deleted.

4 changes: 4 additions & 0 deletions tests/test_version.py
@@ -0,0 +1,4 @@
def test_version():
import check_reqs as cr

assert cr.get_version()

0 comments on commit 31e3e42

Please sign in to comment.