Skip to content

Commit

Permalink
Merge pull request #15 from it-goats/feature/ITG-79/setup-ci
Browse files Browse the repository at this point in the history
[ITG-79] Setup CI
  • Loading branch information
john-sonz committed Apr 9, 2022
2 parents 09173dd + 67ebca5 commit 4f07fce
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/bode_ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Bode CI"

on:
pull_request:
paths:
- "bode/**"
push:
paths:
- "bode/**"

jobs:
ci:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./bode

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10.4"
- uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: "1.1.13"

- name: Cache venv
id: cache-venv
uses: actions/cache@v2
env:
cache-name: cache-venv
with:
path: .venv
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: poetry config virtualenvs.in-project true

- name: Install dependencies
run: poetry install

- name: Check formatting
run: poetry run black bode migrations --check --verbose

- name: Lint
run: poetry run flake8 bode migrations --verbose

- name: Check sorting
run: poetry run isort bode migrations --check
48 changes: 48 additions & 0 deletions .github/workflows/cabra_ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "Cabra CI"

on:
pull_request:
paths:
- "cabra/**"
push:
paths:
- "cabra/**"

jobs:
ci:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cabra

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16.14.2"

- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm ci

- name: Check formatting
run: npm run format:check

- name: Check types
run: npm run types:check

- name: Lint
run: npm run lint:check

0 comments on commit 4f07fce

Please sign in to comment.