Skip to content

Commit

Permalink
fix: CI was caching incorrect directory for Hermit (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas authored Dec 21, 2023
1 parent 60ca2f8 commit 947664b
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 74 deletions.
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

0 comments on commit 947664b

Please sign in to comment.