Skip to content

Commit

Permalink
Merge pull request #4 from ZeroGachis/feature/github-actions
Browse files Browse the repository at this point in the history
👷 Add CI step via self hosted Github actions
  • Loading branch information
ducdetronquito authored Oct 21, 2022
2 parents 0cbb6e5 + ff8bd22 commit a1407be
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on:
pull_request:

jobs:
build:
runs-on: [self-hosted, terraform-python]
steps:
- name: Clean Workspace
uses: mickem/clean-after-action@v1
- name: Checkout
uses: actions/checkout@v3
- name: Install source
run: pip3 install -e .[dev]
- name: Black
run: python3 -m black --check --diff magicparse/ tests/ setup.py
- name: flake8
run: python3 -m flake8
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ repos:
hooks:
- id: black
language_version: python3.9
- id: black
alias: black-on-ci
args: ["--check --diff"]
stages: [manual]
- repo: https://github.com/pycqa/flake8
rev: 5.0.3
hooks:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WORKDIR /home/src/magicparse
RUN pip install pytest

COPY . ./
RUN pip install -e .
RUN pip install -e .[dev]

USER $USERNAME

Expand Down
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,11 @@
packages=[
"magicparse",
],
extras_require={
"dev": [
"black",
"flake8",
"pytest",
]
},
)

0 comments on commit a1407be

Please sign in to comment.