Implement Dashboard Module & Refactor Devices Module in Flutter App #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI Tests" | |
on: | |
pull_request: | |
paths-ignore: | |
- "docs/**" | |
- "spec/**" | |
push: | |
branches: | |
- "main" | |
tags: | |
- "v*" | |
schedule: | |
- cron: "0 8 * * 1" # At 08:00 on Monday | |
jobs: | |
backend-analyze: | |
name: "Backend code analysis" | |
runs-on: "${{ matrix.operating-system }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ "ubuntu-latest" ] | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Setup Node.js" | |
uses: "actions/setup-node@v4" | |
with: | |
node-version: "20" | |
- name: "Cache JS dependencies" | |
uses: "actions/cache@v3" | |
with: | |
path: "${{ steps.yarn-cache-dir-path.outputs.dir }}" | |
key: "${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }}" | |
restore-keys: "${{ runner.os }}-node-modules-" | |
- name: "Install NPM dependencies" | |
shell: "bash" | |
run: "yarn install" | |
- name: "Run Code Linting" | |
run: "yarn workspace @fastybird/smart-panel-backend lint:js" | |
- name: "Run Code Linting" | |
run: "yarn workspace @fastybird/smart-panel-backend lint:openapi" | |
backend-tests: | |
name: "Backend code tests" | |
runs-on: "${{ matrix.operating-system }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ "ubuntu-latest" ] | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Setup Node.js" | |
uses: "actions/setup-node@v4" | |
with: | |
node-version: "20" | |
- name: "Cache JS dependencies" | |
uses: "actions/cache@v3" | |
with: | |
path: "${{ steps.yarn-cache-dir-path.outputs.dir }}" | |
key: "${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }}" | |
restore-keys: "${{ runner.os }}-node-modules-" | |
- name: "Start InfluxDB" | |
run: | | |
docker run -d --name influxdb \ | |
-p 8086:8086 \ | |
-e INFLUXDB_DB=fastybird \ | |
-e INFLUXDB_ADMIN_USER= \ | |
-e INFLUXDB_ADMIN_PASSWORD= \ | |
influxdb:1.8 | |
- name: "Install NPM dependencies" | |
shell: "bash" | |
run: "yarn install" | |
- name: "Run Unit Tests" | |
run: "yarn workspace @fastybird/smart-panel-backend test:unit" | |
- name: "Run E2E Tests" | |
run: "yarn workspace @fastybird/smart-panel-backend test:e2e" | |
- name: "Generate Coverage Report" | |
run: "yarn workspace @fastybird/smart-panel-backend test:cov" | |
panel-analyze: | |
name: "Panel code analysis" | |
runs-on: "${{ matrix.operating-system }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ "ubuntu-latest" ] | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Install Flutter SDK" | |
uses: "subosito/flutter-action@v2" | |
with: | |
channel: stable | |
flutter-version: 3.27.0 | |
- name: "Install Melos" | |
run: "dart pub global activate melos" | |
- name: "Bootstrap Dependencies" | |
run: "melos bootstrap" | |
- name: "Run Dart Analyzer" | |
run: "melos run analyze" |