Skip to content

Commit a7674ec

Browse files
committed
add(751): add github actions to execute tests
- 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
1 parent eb3c1da commit a7674ec

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/test.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master # Only run when PR is raised for master
10+
11+
# This ensures for a single PR one job is run in case of multiple runs
12+
concurrency:
13+
group: build-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
test:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
# Lint the Code
22+
- name: Black Validation
23+
uses: psf/black@stable
24+
- name: Check Flake8 Formatting
25+
uses: py-actions/flake8@v2
26+
# Run Tests
27+
- name: Run Tests
28+
run: docker-compose -f "docker-compose.test.yml" up --build

0 commit comments

Comments
 (0)