Skip to content

Commit 6634741

Browse files
authored
Merge branch 'main' into use_expando
2 parents 3a962f5 + 00c371e commit 6634741

File tree

347 files changed

+16711
-13126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

347 files changed

+16711
-13126
lines changed

β€Ž.github/CODEOWNERSβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Every request must be reviewed and accepted by:
22

3-
* @VeryGoodOpenSource/codeowners
3+
* @alestiago @erickzanardo @felangel @marcossevilla @renancaraujo @wolfenrain
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Astro Site Workflow
2+
description: Build and test Astro sites.
3+
4+
inputs:
5+
working_directory:
6+
required: false
7+
default: "."
8+
description: The working directory for this workflow
9+
node_version:
10+
required: false
11+
default: "22"
12+
description: The node version to use.
13+
14+
runs:
15+
using: "composite"
16+
steps:
17+
- name: βš™οΈ Setup Node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: ${{ inputs.node_version }}
21+
22+
- name: ⬇️ Install Dependencies
23+
run: npm install
24+
shell: ${{ inputs.shell }}
25+
working-directory: ${{ inputs.working_directory }}
26+
27+
- name: ✨ Check Format
28+
run: npm run format:check
29+
shell: ${{ inputs.shell }}
30+
working-directory: ${{ inputs.working_directory }}
31+
32+
- name: πŸ“¦ Build Site
33+
uses: withastro/action@v2
34+
with:
35+
path: ${{ inputs.working_directory }}
36+
node-version: ${{ inputs.node_version }}
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Dart Package Workflow
2+
description: Build and test Dart packages.
3+
4+
inputs:
5+
collect_coverage:
6+
required: false
7+
default: "true"
8+
description: Whether to collect code coverage
9+
collect_score:
10+
required: false
11+
default: "true"
12+
description: Whether to collect the pana score
13+
concurrency:
14+
required: false
15+
default: "4"
16+
description: The value of the concurrency flag (-j) used when running tests
17+
coverage_excludes:
18+
required: false
19+
default: ""
20+
description: Globs to exclude from coverage
21+
dart_sdk:
22+
required: false
23+
default: "stable"
24+
description: "The dart sdk version to use"
25+
working_directory:
26+
required: false
27+
default: "."
28+
description: The working directory for this workflow
29+
min_coverage:
30+
required: false
31+
default: "100"
32+
description: The minimum coverage percentage value
33+
min_score:
34+
required: false
35+
default: "120"
36+
description: The minimum pana score value
37+
analyze_directories:
38+
required: false
39+
default: "lib test"
40+
description: Directories to analyze
41+
report_on:
42+
required: false
43+
default: "lib"
44+
description: Directories to report on when collecting coverage
45+
run_tests:
46+
required: false
47+
default: "true"
48+
description: Whether to run tests for the package.
49+
50+
runs:
51+
using: "composite"
52+
steps:
53+
- name: 🎯 Setup Dart
54+
uses: dart-lang/setup-dart@v1
55+
with:
56+
sdk: ${{inputs.dart_sdk}}
57+
58+
- name: πŸ“¦ Install Dependencies
59+
working-directory: ${{ inputs.working_directory }}
60+
shell: ${{ inputs.shell }}
61+
run: dart pub get
62+
63+
- name: ✨ Format
64+
working-directory: ${{ inputs.working_directory }}
65+
shell: ${{ inputs.shell }}
66+
run: dart format --set-exit-if-changed .
67+
68+
- name: πŸ” Analyze
69+
working-directory: ${{ inputs.working_directory }}
70+
shell: ${{ inputs.shell }}
71+
run: dart analyze --fatal-warnings ${{inputs.analyze_directories}}
72+
73+
- name: πŸ§ͺ Test
74+
if: inputs.run_tests == 'true'
75+
working-directory: ${{ inputs.working_directory }}
76+
shell: ${{ inputs.shell }}
77+
run: |
78+
dart pub global activate coverage
79+
dart test -j ${{inputs.concurrency}} --coverage=coverage && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=${{inputs.report_on}} --check-ignore
80+
81+
- name: πŸ“Š Verify Coverage
82+
if: inputs.run_tests == 'true' && inputs.collect_coverage == 'true'
83+
uses: VeryGoodOpenSource/very_good_coverage@v3
84+
with:
85+
path: ${{inputs.working_directory}}/coverage/lcov.info
86+
exclude: ${{inputs.coverage_excludes}}
87+
min_coverage: ${{inputs.min_coverage}}
88+
89+
- name: πŸ’― Verify Pub Score
90+
if: inputs.collect_score == 'true'
91+
working-directory: ${{ inputs.working_directory }}
92+
shell: ${{ inputs.shell }}
93+
run: |
94+
dart pub global activate pana 0.22.21
95+
sudo apt-get install webp
96+
PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
97+
echo "score: $PANA_SCORE"
98+
IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0]; TOTAL=SCORE_ARR[1]
99+
if [ -z "$1" ]; then MINIMUM_SCORE=TOTAL; else MINIMUM_SCORE=$1; fi
100+
if (( $SCORE < $MINIMUM_SCORE )); then echo "minimum score $MINIMUM_SCORE was not met!"; exit 1; fi
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish to pub.dev
2+
description: Publish a package to pub.dev
3+
4+
inputs:
5+
working_directory:
6+
description: Directory within the repository where the package is located (defaults to root).
7+
required: false
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: πŸ“š Git Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: 🎯 Setup Dart
16+
uses: dart-lang/setup-dart@v1
17+
18+
- name: πŸͺͺ Get Token
19+
uses: actions/github-script@v6
20+
with:
21+
script: |
22+
const pub_token = await core.getIDToken('https://pub.dev')
23+
core.exportVariable('PUB_TOKEN', pub_token)
24+
25+
- name: πŸ” Authenticate
26+
shell: ${{ inputs.shell }}
27+
run: dart pub token add https://pub.dev --env-var PUB_TOKEN
28+
29+
- name: πŸ“¦ Install dependencies
30+
shell: ${{ inputs.shell }}
31+
run: dart pub get
32+
working-directory: ${{ inputs.working_directory }}
33+
34+
- name: 🌡 Dry Run
35+
shell: ${{ inputs.shell }}
36+
run: dart pub publish --dry-run
37+
working-directory: ${{ inputs.working_directory }}
38+
39+
- name: πŸ“’ Publish
40+
shell: ${{ inputs.shell }}
41+
run: dart pub publish -f
42+
working-directory: ${{ inputs.working_directory }}

β€Ž.github/bump_bundles.yamlβ€Ž

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

β€Ž.github/dependabot.yamlβ€Ž

Lines changed: 39 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,50 @@
11
version: 2
22
updates:
3+
# GitHub Actions Dependencies
34
- package-ecosystem: "github-actions"
45
directory: "/"
56
schedule:
6-
interval: "daily"
7-
- package-ecosystem: "npm"
8-
directory: "/docs"
9-
schedule:
10-
interval: "weekly"
7+
interval: "monthly"
8+
groups:
9+
gh-deps:
10+
patterns:
11+
- "*"
12+
# NPM Dependencies
1113
- package-ecosystem: "npm"
1214
directory: "/extensions/vscode"
1315
schedule:
14-
interval: "weekly"
16+
interval: "monthly"
1517
ignore:
16-
# Updating @types/vscode requires unnecessarily bumping the VS Code engine version, see:
17-
# https://github.com/VeryGoodOpenSource/dart_frog/issues/1033
18+
# Updating @types/vscode requires unnecessarily bumping the VSCode engine version, see:
19+
# https://github.com/dart-frog-dev/dart_frog/issues/1033
1820
- dependency-name: "@types/vscode"
19-
- package-ecosystem: "pub"
20-
directory: "/bricks/create_dart_frog/hooks"
21-
schedule:
22-
interval: "daily"
23-
- package-ecosystem: "pub"
24-
directory: "/bricks/dart_frog_dev_server/hooks"
25-
schedule:
26-
interval: "daily"
27-
- package-ecosystem: "pub"
28-
directory: "/bricks/dart_frog_new/hooks"
29-
schedule:
30-
interval: "daily"
31-
- package-ecosystem: "pub"
32-
directory: "/bricks/dart_frog_prod_server/hooks"
33-
schedule:
34-
interval: "daily"
35-
- package-ecosystem: "pub"
36-
directory: "/examples/echo"
37-
schedule:
38-
interval: "daily"
39-
- package-ecosystem: "pub"
40-
directory: "/examples/hello_world"
41-
schedule:
42-
interval: "daily"
43-
- package-ecosystem: "pub"
44-
directory: "/examples/web_socket_counter"
45-
schedule:
46-
interval: "daily"
47-
- package-ecosystem: "pub"
48-
directory: "/examples/counter"
49-
schedule:
50-
interval: "daily"
51-
- package-ecosystem: "pub"
52-
directory: "/examples/todos"
53-
schedule:
54-
interval: "daily"
55-
- package-ecosystem: "pub"
56-
directory: "/examples/todos/packages/todos_data_source"
57-
schedule:
58-
interval: "daily"
59-
- package-ecosystem: "pub"
60-
directory: "/examples/todos/packages/in_memory_todos_data_source"
61-
schedule:
62-
interval: "daily"
63-
- package-ecosystem: "pub"
64-
directory: "/examples/kitchen_sink"
65-
schedule:
66-
interval: "daily"
67-
- package-ecosystem: "pub"
68-
directory: "/packages/dart_frog_cli"
69-
schedule:
70-
interval: "daily"
71-
- package-ecosystem: "pub"
72-
directory: "/packages/dart_frog_cli/e2e"
73-
schedule:
74-
interval: "daily"
75-
- package-ecosystem: "pub"
76-
directory: "/packages/dart_frog_gen"
77-
schedule:
78-
interval: "daily"
79-
- package-ecosystem: "pub"
80-
directory: "/packages/dart_frog"
81-
schedule:
82-
interval: "daily"
83-
- package-ecosystem: "pub"
84-
directory: "/packages/dart_frog_web_socket"
85-
schedule:
86-
interval: "daily"
87-
- package-ecosystem: "pub"
88-
directory: "/packages/dart_frog_auth"
21+
groups:
22+
npm-deps:
23+
patterns:
24+
- "*"
25+
- package-ecosystem: "npm"
26+
directory: "/docs"
8927
schedule:
90-
interval: "daily"
28+
interval: "monthly"
29+
groups:
30+
npm-deps:
31+
patterns:
32+
- "*"
33+
# Dart Dependencies
34+
- package-ecosystem: pub
35+
directories:
36+
- /packages/dart_frog
37+
- /packages/dart_frog_auth
38+
- /packages/dart_frog_cli/e2e
39+
- /packages/dart_frog_cli
40+
- /packages/dart_frog_gen
41+
- /packages/dart_frog_lint
42+
- /packages/dart_frog_test/example
43+
- /packages/dart_frog_test
44+
- /packages/dart_frog_web_socket
45+
schedule:
46+
interval: monthly
47+
groups:
48+
dart-deps:
49+
patterns:
50+
- "*"

β€Ž.github/workflows/.docker_tests.yamlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- name: πŸ“š Git Checkout
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v5
3333

3434
- name: 🎯 Setup Dart
3535
uses: dart-lang/setup-dart@v1

β€Ž.github/workflows/dart_frog_cli.yamlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
steps:
4141
- name: πŸ“š Git Checkout
42-
uses: actions/checkout@v4
42+
uses: actions/checkout@v5
4343

4444
- name: 🎯 Setup Dart
4545
uses: dart-lang/setup-dart@v1

0 commit comments

Comments
Β (0)