This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
Change version to 24.01.240 (66) #293
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: Run static checks and tests | |
on: | |
workflow_dispatch: | |
# Runs when a PR is made against master branch | |
pull_request: | |
branches: [ master ] | |
env: | |
flutter_version: "3.16.8" | |
jobs: | |
run_checks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Ensure no unused strings | |
run: python find_unused_strings.py --fail-if-found | |
- name: Cache Flutter dependencies | |
uses: actions/cache@v2 | |
with: | |
path: /opt/hostedtoolcache/flutter | |
key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }} | |
- uses: subosito/flutter-action@v1 | |
with: | |
flutter-version: ${{ env.flutter_version }} | |
channel: stable | |
- name: Check for any formatting issues in the code | |
run: dart format --set-exit-if-changed . | |
# NOTE: submodules are being fetched _after_ formatting - | |
# we don't want to fail because of bad formatting in submodules | |
- name: Checkout submodules (Open Food Facts) | |
run: git submodule update --init --recursive | |
- name: Create the .env file so that the flutter analyze cmd would not fail | |
run: | | |
touch .env | |
shell: bash | |
- name: Statically analyze the Dart code for any errors | |
run: flutter analyze . | |
- name: Run pub get | |
run: flutter pub get | |
- name: Run tests | |
run: flutter test |