Skip to content

Commit

Permalink
Include tests with build
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowtham1729 committed Nov 6, 2023
1 parent ba714ab commit af769a0
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/build-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,23 @@ jobs:
with:
token: ${{ secrets.PAT_TOKEN }}

# Authentication via credentials json
- name: Set up Taskfile
uses: arduino/[email protected]

- name: Run Lint Check
run: task lint-check

- name: Run all tests
run: task test

# Authentication to GCP via credentials json
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'

- name: Docker configuration
run: gcloud auth configure-docker ${{ env.GAR_LOCATION }}-docker.pkg.dev --quiet

- name: Set up Taskfile
uses: arduino/[email protected]

- name: Build
run: task build-backend-image tag="$GITHUB_SHA"
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/build-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ jobs:
with:
token: ${{ secrets.PAT_TOKEN }}

# Authentication via credentials json
- name: Run Lint Check
run: task lint-check

- name: Run all tests
run: task test

# Authentication to GCP via credentials json
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
name: Python Tests

on:
push:
branches: [ "main" ]
paths:
- "applications/**"
# push:
# branches: [ "main" ]
# paths:
# - "applications/**"
pull_request:
branches: [ "main" ]
paths:
Expand Down
15 changes: 15 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,21 @@ tasks:
cmds:
- echo "Tested the Data Analyzer"

test-frontend:
desc: Run tests for the frontend server.
# deps:
# - install-frontend
cmds:
- cd applications/frontend && echo "Tested the frontend"

test:
desc: Run all tests.
deps:
- test-backend
- test-fetcher
- test-analyzer
- test-frontend


# Infrastructure tasks
helm-setup:
Expand Down

0 comments on commit af769a0

Please sign in to comment.