Skip to content

Bump coverage from 7.6.7 to 7.6.8 in /backend in the dev-deps group #2

Bump coverage from 7.6.7 to 7.6.8 in /backend in the dev-deps group

Bump coverage from 7.6.7 to 7.6.8 in /backend in the dev-deps group #2

Workflow file for this run

name: Backend & Frontend Test
on:
push:
# This should disable running the workflow on tags, according to the
# on.<push|pull_request>.<branches|tags> GitHub Actions docs.
# cheers @ https://github.com/psycopg/psycopg/blob/5681de9c42f916d5b2436ad9c6f47b79c8aeaa12/.github/workflows/tests.yml#L4-L8
branches:
- "*"
pull_request:
branches: [main]
schedule:
- cron: "0 0 * * *"
workflow_call:
jobs:
secret-scan:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}} # Only required for Organizations, not personal accounts.
test-backend:
runs-on: ubuntu-latest
env:
DJANGO_SETTINGS_MODULE: zest.settings.dev
DJANGO_SECRET_KEY: "JASIDJ*@ioda89dY2hdaiophd80a23p06i%8-4ods3"
DJANGO_ALLOWED_HOSTS: localhost,0.0.0.0,127.0.0.1
DJANGO_AUTH_MODE: jwt
TESTFLAGS: "--with-coverage --cover-xml --cover-erase"
SQL_ENGINE: django.db.backends.postgresql
SQL_DATABASE: zest
SQL_USER: postgres
SQL_PASSWORD: postgres
SQL_HOST: db
SQL_PORT: 5432
REDIS_ADDRESS: redis://cache:6379/1
steps:
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Build docker images
run: |
task backend-build backend-django-migrate backend-install-fixtures
- name: Test
run: task backend-test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: backend/coverage.xml
flags: backend,unittest
token: ${{ secrets.CODECOV_TOKEN }}
test-frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: "11"
# Setup the flutter environment.
- uses: subosito/flutter-action@v2
with:
channel: "stable" # 'dev', 'alpha', default to: 'stable'
# flutter-version: '1.12.x' # you can also specify exact version of flutter
- run: flutter --version
- run: flutter --disable-analytics
- name: Prepare environment.
run: flutter pub get
- name: Check formatting
run: dart format --set-exit-if-changed .
- name: Build runner
run: dart run build_runner build --delete-conflicting-outputs
- name: Static code analysis (no-fatal-infos)
run: flutter analyze . --no-fatal-infos --no-fatal-warnings
- name: Tests
run: flutter test --coverage
# - name: Generate Coverage
# run: |
# sudo apt-get install -y lcov
# lcov --remove coverage/lcov.info 'lib/*/*.freezed.dart' 'lib/*.g.dart' 'lib/*/*.part.dart' 'lib/generated/*.dart' 'lib/generated/*/*.dart' -o coverage/lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: coverage/lcov.info
flags: frontend,unittest
token: ${{ secrets.CODECOV_TOKEN }}