Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: CI was caching incorrect directory for Hermit #19

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ jobs:
- name: Cache Flutter
uses: actions/cache@v3
with:
path: ~/.cache/hermit/cache/pkg
path: ~/.cache/hermit/pkg
key: ${{ runner.os }}-hermit-cache-${{ hashFiles('bin/.*.pkg') }}
restore-keys: |
${{ runner.os }}-hermit-cache-

- name: Install Dependencies
run: make get
run: just get

- name: Run Flutter Analyze
run: make analyze
run: just analyze

- name: Run Flutter Test
run: make test
run: just test
55 changes: 55 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Run the Flutter app
run:
flutter run

# Get packages
get:
#!/bin/bash
echo "Getting dependencies for main project"
flutter pub get
echo "Getting dependencies for packages"
for dir in packages/*; do \
if [ -d $dir ]; then \
echo "Getting dependencies in $dir"; \
(cd $dir && flutter pub get || dart pub get); \
fi \
done

# Clean the project
clean:
flutter clean

# Build the app for release
build:
flutter build apk

# Run tests
test: test-app test-packages

# Run Flutter tests
test-app:
@echo "Running Flutter tests"
@flutter test

# Run package tests
test-packages:
@echo "Running Dart tests in packages"
@for dir in packages/*; do \
if [ -d $dir ]; then \
echo "Running tests in $dir"; \
(cd $dir && dart test); \
fi \
done

# Analyze the project's Dart code
analyze:
@flutter analyze
@for dir in packages/*; do \
if [ -d $dir ]; then \
(cd $dir && dart analyze); \
fi \
done

# Generate code
generate:
flutter gen-l10n
70 changes: 0 additions & 70 deletions Makefile

This file was deleted.

1 change: 1 addition & 0 deletions bin/.just-1.16.0.pkg
1 change: 1 addition & 0 deletions bin/just