Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit 947664b

Browse files
authored
fix: CI was caching incorrect directory for Hermit (#19)
1 parent 60ca2f8 commit 947664b

File tree

5 files changed

+61
-74
lines changed

5 files changed

+61
-74
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ jobs:
1919
- name: Cache Flutter
2020
uses: actions/cache@v3
2121
with:
22-
path: ~/.cache/hermit/cache/pkg
22+
path: ~/.cache/hermit/pkg
2323
key: ${{ runner.os }}-hermit-cache-${{ hashFiles('bin/.*.pkg') }}
2424
restore-keys: |
2525
${{ runner.os }}-hermit-cache-
2626
2727
- name: Install Dependencies
28-
run: make get
28+
run: just get
2929

3030
- name: Run Flutter Analyze
31-
run: make analyze
31+
run: just analyze
3232

3333
- name: Run Flutter Test
34-
run: make test
34+
run: just test

Justfile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Run the Flutter app
2+
run:
3+
flutter run
4+
5+
# Get packages
6+
get:
7+
#!/bin/bash
8+
echo "Getting dependencies for main project"
9+
flutter pub get
10+
echo "Getting dependencies for packages"
11+
for dir in packages/*; do \
12+
if [ -d $dir ]; then \
13+
echo "Getting dependencies in $dir"; \
14+
(cd $dir && flutter pub get || dart pub get); \
15+
fi \
16+
done
17+
18+
# Clean the project
19+
clean:
20+
flutter clean
21+
22+
# Build the app for release
23+
build:
24+
flutter build apk
25+
26+
# Run tests
27+
test: test-app test-packages
28+
29+
# Run Flutter tests
30+
test-app:
31+
@echo "Running Flutter tests"
32+
@flutter test
33+
34+
# Run package tests
35+
test-packages:
36+
@echo "Running Dart tests in packages"
37+
@for dir in packages/*; do \
38+
if [ -d $dir ]; then \
39+
echo "Running tests in $dir"; \
40+
(cd $dir && dart test); \
41+
fi \
42+
done
43+
44+
# Analyze the project's Dart code
45+
analyze:
46+
@flutter analyze
47+
@for dir in packages/*; do \
48+
if [ -d $dir ]; then \
49+
(cd $dir && dart analyze); \
50+
fi \
51+
done
52+
53+
# Generate code
54+
generate:
55+
flutter gen-l10n

Makefile

Lines changed: 0 additions & 70 deletions
This file was deleted.

bin/.just-1.16.0.pkg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hermit

bin/just

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.just-1.16.0.pkg

0 commit comments

Comments
 (0)