Skip to content

Remove unused debugging code #181

Remove unused debugging code

Remove unused debugging code #181

Workflow file for this run

---
name: Build, test, and release device_client
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
- name: install flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.4'
channel: 'stable'
- name: use cache
uses: actions/cache@v3
with:
path: /home/runner/.pub-cache
key: ${{ runner.os }}-pub-cache-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-cache-
- name: build web application
run: |
cd extras/device_client
flutter --version >> /dev/null # avoid welcome message
flutter build web
tar -czvf /tmp/device_client.tar.gz build/web
- name: save web files as an artifact
uses: actions/upload-artifact@v4
with:
name: device_client
path: /tmp/device_client.tar.gz
retention-days: 1
test:
runs-on: ubuntu-latest
needs: build
steps:
- name: checkout code
uses: actions/checkout@v4
- name: install flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.4'
channel: 'stable'
- name: use cache
uses: actions/cache@v3
with:
path: /home/runner/.pub-cache
key: ${{ runner.os }}-pub-cache-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-cache-
- name: lint and test
run: |
cd extras/device_client
dart pub get # https://github.com/dart-lang/sdk/issues/50422
dart format --output=none --set-exit-if-changed .
dart analyze --fatal-infos
flutter --version >> /dev/null # avoid welcome message
flutter test --concurrency=1
release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: test
steps:
- name: download web files
uses: actions/download-artifact@v4
with:
name: device_client
- name: create release
uses: softprops/action-gh-release@v2
with:
files: device_client.tar.gz