Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

central backend check yml file #971

Merged
merged 53 commits into from
Sep 24, 2023
Merged
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
ce96260
central backend check yml file
karkir0003 Sep 19, 2023
dfca3a8
test
karkir0003 Sep 19, 2023
c3cc632
lint before test job
karkir0003 Sep 19, 2023
a35ac98
micromamba version fix
karkir0003 Sep 19, 2023
76d2d1c
updates
karkir0003 Sep 19, 2023
88a9319
Update backend.yml
karkir0003 Sep 19, 2023
579ac7c
Update backend.yml
karkir0003 Sep 19, 2023
c2596a0
Update backend.yml
karkir0003 Sep 19, 2023
40c0986
Update backend.yml
karkir0003 Sep 20, 2023
16283db
Update backend.yml
karkir0003 Sep 20, 2023
04b302a
Update backend.yml
karkir0003 Sep 20, 2023
fe7d9d9
Update backend.yml
karkir0003 Sep 20, 2023
eb8ac71
micromamba shell config
karkir0003 Sep 20, 2023
3f178c5
Update backend.yml
karkir0003 Sep 22, 2023
53b64b9
Update backend.yml
karkir0003 Sep 22, 2023
977e30a
Update backend.yml
karkir0003 Sep 22, 2023
28d9b8a
Update backend.yml
karkir0003 Sep 23, 2023
6fdacc3
Update backend.yml
karkir0003 Sep 23, 2023
a862fbb
Update backend.yml
karkir0003 Sep 23, 2023
3c55a2a
Update backend.yml
karkir0003 Sep 23, 2023
2aa0acd
Update backend.yml
karkir0003 Sep 23, 2023
43a2c7f
Update backend.yml
karkir0003 Sep 23, 2023
b864cbe
Update backend.yml
karkir0003 Sep 23, 2023
5cf1cf1
Update backend.yml
karkir0003 Sep 23, 2023
2eb3086
Update backend.yml
karkir0003 Sep 23, 2023
d42d29a
Update backend.yml
karkir0003 Sep 23, 2023
125c5bf
Update backend.yml
karkir0003 Sep 24, 2023
f99add4
Update backend.yml
karkir0003 Sep 24, 2023
eb12428
Update backend.yml
karkir0003 Sep 24, 2023
879b485
Update backend.yml
karkir0003 Sep 24, 2023
1ed7c69
Update backend.yml
karkir0003 Sep 24, 2023
232eae9
Update backend.yml
karkir0003 Sep 24, 2023
56eb16a
Update backend.yml
karkir0003 Sep 24, 2023
b37336a
Update backend.yml
karkir0003 Sep 24, 2023
d05e900
Update backend.yml
karkir0003 Sep 24, 2023
76087ea
Update backend.yml
karkir0003 Sep 24, 2023
2caf7a0
Update backend.yml
karkir0003 Sep 24, 2023
cfaa83e
Update backend.yml
karkir0003 Sep 24, 2023
e009f0b
Update backend.yml
karkir0003 Sep 24, 2023
eea80d9
Update backend.yml
karkir0003 Sep 24, 2023
241e2f8
Update backend.yml
karkir0003 Sep 24, 2023
3e9562c
Update backend.yml
karkir0003 Sep 24, 2023
5e2bec8
Update backend.yml
karkir0003 Sep 24, 2023
4a7b3a0
Update backend.yml
karkir0003 Sep 24, 2023
dceb3ed
Update backend.yml
karkir0003 Sep 24, 2023
f8ab915
Update backend.yml
karkir0003 Sep 24, 2023
8b8f650
Update backend.yml
karkir0003 Sep 24, 2023
1ea3075
Update backend.yml
karkir0003 Sep 24, 2023
4013ca4
Update backend.yml
karkir0003 Sep 24, 2023
f82c564
Update backend.yml
karkir0003 Sep 24, 2023
66cadeb
Update backend.yml
karkir0003 Sep 24, 2023
9cc4d92
Update backend.yml
karkir0003 Sep 24, 2023
9fb4d90
Merge branch 'nextjs' into backend-central-build-check
dwu359 Sep 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Backend Checks

on:
push:
branches:
- main
- nextjs
- prod-deploy
pull_request:
paths:
- "training/**"

jobs:
lint:
runs-on: ubuntu-22.04
steps:
#----------------------------------------------
# check-out repo and set-up mamba env
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3

- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.4.5-0'
environment-file: training/environment.yml
init-shell: >-
bash
cache-environment: true
cache-environment-key: mamba-env-${{ runner.os }}-${{ hashFiles('**/training/environment.yml') }}

#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: /home/runner/micromamba/envs/dlp/
key: training-venv-${{ runner.os }}-${{ hashFiles('**/training/poetry.lock') }}
restore-keys: training-venv-${{ runner.os }}-

#---------------------------------------------------
# install dependencies if cache does not exist
#---------------------------------------------------

- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: pwd && cd training && poetry install --no-interaction --no-root && poetry env info -p
shell: micromamba-shell {0}

#----------------------------------------------
# pyright static checker
#----------------------------------------------
- name: Run Pyright Static Checker
id: pyright-static-checker
uses: jordemort/action-pyright@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # You need this
reporter: github-pr-review # Change reporter.
lib: true

#----------------------------------------------
# black formatter
#----------------------------------------------
- uses: rickstaa/action-black@v1
id: action_black
with:
black_args: "."

- uses: stefanzweifel/git-auto-commit-action@v4
if: steps.action_black.outputs.is_formatted == 'true'
with:
commit_message: ":art: Format Python code with psf/black"
commit_options: '--no-verify'
commit_user_name: github-actions
commit_user_email: ghaction@github.com

test:
needs: lint
runs-on: ubuntu-22.04
steps:
#----------------------------------------------
# check-out repo and set-up mamba env
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3

- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.4.5-0'
environment-file: training/environment.yml
init-shell: >-
bash
cache-environment: true
cache-environment-key: mamba-env-${{ runner.os }}-${{ hashFiles('**/training/environment.yml') }}

#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: /home/runner/micromamba/envs/dlp/
key: training-venv-${{ runner.os }}-${{ hashFiles('**/training/poetry.lock') }}
restore-keys: training-venv-${{ runner.os }}-
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: cd training && poetry install --no-interaction --no-root
shell: micromamba-shell {0}
#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run tests with moto
run: |
export AWS_ACCESS_KEY_ID=testing
export AWS_SECRET_ACCESS_KEY=testing
export AWS_DEFAULT_REGION=us-west-2
# cd training && pytest tests
shell: micromamba-shell {0}