Skip to content

Commit

Permalink
Fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
warrenrhodes committed Oct 1, 2024
1 parent 9023b26 commit faaf6c2
Show file tree
Hide file tree
Showing 43 changed files with 138 additions and 11 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ jobs:
spellcheck:
uses: ./.github/workflows/presubmit_spellcheck.yml

yaml:
uses: ./.github/workflows/presubmit_yaml.yml

unit-tests-finished:
needs: [sabitu-client]
runs-on: [self-hosted, Linux]
runs-on: ubuntu-latest]
steps:
- uses: coverallsapp/github-action@v2
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/presubmit_sabitu_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

jobs:
build-web:
runs-on: [self-hosted]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
# Install pre-requisites.
Expand All @@ -26,7 +26,7 @@ jobs:
- run: ./scripts/build_web_app.sh sabitou_clients

unit-tests:
runs-on: [self-hosted, Linux]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
# Install pre-requisites.
Expand All @@ -40,7 +40,7 @@ jobs:
- run: find . -name \*lcov.info -type f -delete

# Run unit tests on all packages that contain tests.
- run: ./scripts/run_tests.sh sabitou_clients
- run: ./scripts/run_dart_tests.sh sabitou_clients

# Upload Coverage to coveralls.io.
- name: Upload Coverage to Coveralls
Expand All @@ -63,7 +63,7 @@ jobs:
generate-goldens:
needs: unit-tests
if: ${{ always() && (needs.unit-tests.result=='failure') }}
runs-on: [self-hosted, Linux]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
# Install pre-requisites.
Expand All @@ -88,7 +88,7 @@ jobs:
update-goldens:
needs: generate-goldens
if: ${{ always() && (needs.generate-goldens.result=='success') }}
runs-on: [self-hosted, Linux]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
# Install pre-requisites.
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
run: echo "No Changes!"

dart-format:
runs-on: [self-hosted]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
# Install pre-requisites.
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/presubmit_scripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Pre-Submit (Scripts)
on:
workflow_call:

jobs:
changes:
runs-on: ubuntu-latest
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
src:
- '.github/workflows/presubmit_scripts.yml'
- 'scripts/**'
shellcheck:
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# Install pre-requisites.
- uses: actions/checkout@v4

# Lint all our shell scripts.
- uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
path: "scripts"
pattern: "*.sh"

shfmt:
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-shfmt@v1
44 changes: 44 additions & 0 deletions .github/workflows/presubmit_spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Pre-Submit (Spellcheck)
on:
workflow_call:

jobs:
changes:
runs-on: ubuntu-latest
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
src:
- '**/*.md'
- '**/*.txt'
- '.github/workflows/presubmit_spellcheck.yml'
misspell:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.github_token }}
exclude: |
**/package-lock.json
**/app_internationalization.dart
**/remote_config.json
languagetool:
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-languagetool@v1
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
1 change: 0 additions & 1 deletion sabitou_clients/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ linter:
- use_function_type_syntax_for_parameters
#
#
# Spreeloop rules.
#
- prefer_final_locals
- require_trailing_commas
Expand Down
1 change: 1 addition & 0 deletions sabitou_clients/lib/models/product.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/models/sales_order.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/models/store.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/models/supplier.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/models/user.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/providers/auth_provider.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/providers/inventory_provider.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/providers/sales_order_provider.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/providers/store_provider.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/providers/supplier_provider.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/screens/add_product_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/screens/dashboard_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/screens/inventory_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/screens/login_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/screens/reports_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/screens/sales_orders_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/screens/signup_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/screens/store_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/screens/suppliers_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/services/api_service.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/services/auth_service.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/services/inventory_service.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/services/sales_order_service.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/services/store_service.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/services/supplier_service.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/themes/app_theme.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/themes/color_scheme.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/utils/constants.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/utils/helpers.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/widgets/custom_button.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/widgets/loading_indicator.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/widgets/product_card.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions sabitou_clients/lib/widgets/store_card.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

10 changes: 10 additions & 0 deletions scripts/build_web_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Usage:
# ./build_web_app.sh <app-directory> <app-name>

# Build the Web app for the specified project.
cd "$1" || exit

# Build the web version of the flutter app. This will generate a 'build/web' directory.
flutter build web
Empty file modified scripts/generate_goldens.sh
100644 → 100755
Empty file.
Empty file modified scripts/run_dart_format.sh
100644 → 100755
Empty file.
Empty file modified scripts/run_dart_tests.sh
100644 → 100755
Empty file.
Empty file modified scripts/update_goldens.sh
100644 → 100755
Empty file.

0 comments on commit faaf6c2

Please sign in to comment.