Skip to content

Commit

Permalink
add(751): add github actions to execute tests
Browse files Browse the repository at this point in the history
- created workflow directory and test.yml workflow
- added a job that executes existing compose.test.yml file
  to run tests
- job will be triggered when a PR is raised to master or
  push happens to master ( post merge also will trigger a
  job )
- added concurrency check so that old job can be cancelled
  if a new push happens
- added lint actions to lint the code using actions
  • Loading branch information
indiVar0508 committed Jun 15, 2023
1 parent eb3c1da commit a7674ec
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test

on:
push:
branches:
- master
pull_request:
branches:
- master # Only run when PR is raised for master

# This ensures for a single PR one job is run in case of multiple runs
concurrency:
group: build-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Lint the Code
- name: Black Validation
uses: psf/black@stable
- name: Check Flake8 Formatting
uses: py-actions/flake8@v2
# Run Tests
- name: Run Tests
run: docker-compose -f "docker-compose.test.yml" up --build

0 comments on commit a7674ec

Please sign in to comment.