Skip to content

Commit f87328f

Browse files
authored
Create dart.yml
1 parent bf8c847 commit f87328f

1 file changed

Lines changed: 262 additions & 0 deletions

File tree

.github/workflows/dart.yml

Lines changed: 262 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: Dart
7+
8+
on:
9+
push:
10+
branches: [ "main" ]
11+
pull_request:
12+
branches: [ "main" ]
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
# Note: This workflow uses the latest stable version of the Dart SDK.
22+
# You can specify other versions if desired, see documentation here:
23+
# https://github.com/dart-lang/setup-dart/blob/main/README.md
24+
# - uses: dart-lang/setup-dart@v1
25+
- uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
26+
27+
- name: Install dependencies
28+
run: dart pub get
29+
30+
# Uncomment this step to verify the use of 'dart format' on each commit.
31+
# - name: Verify formatting
32+
# run: dart format --output=none --set-exit-if-changed .
33+
34+
# Consider passing '--fatal-infos' for slightly stricter analysis.
35+
- name: Analyze project source
36+
run: dart analyze
37+
38+
# Your project will need to have tests in test/ and a dependency on
39+
# package:test for this step to succeed. Note that Flutter projects will
40+
# want to change this to 'flutter test'.
41+
- name: Run tests
42+
run: dart test
43+
44+
- name: Cache
45+
uses: actions/cache@v4.2.3
46+
with:
47+
# A list of files, directories, and wildcard patterns to cache and restore
48+
path:
49+
# An explicit key for restoring and saving the cache
50+
key:
51+
# An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case.
52+
restore-keys: # optional
53+
# The chunk size used to split up large files during upload, in bytes
54+
upload-chunk-size: # optional
55+
# An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms
56+
enableCrossOsArchive: # optional, default is false
57+
# Fail the workflow if cache entry is not found
58+
fail-on-cache-miss: # optional, default is false
59+
# Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache
60+
lookup-only: # optional, default is false
61+
# Run the post step to save the cache even if another step before fails
62+
save-always: # optional, default is false
63+
64+
- name: Upload a Build Artifact
65+
uses: actions/upload-artifact@v4.6.2
66+
with:
67+
# Artifact name
68+
name: # optional, default is artifact
69+
# A file, directory or wildcard pattern that describes what to upload
70+
path:
71+
# The desired behavior if no files are found using the provided path.
72+
Available Options:
73+
warn: Output a warning but do not fail the action
74+
error: Fail the action with an error message
75+
ignore: Do not output any warnings or errors, the action does not fail
76+
77+
if-no-files-found: # optional, default is warn
78+
# Duration after which artifact will expire in days. 0 means using default retention.
79+
Minimum 1 day. Maximum 90 days unless changed from the repository settings page.
80+
81+
retention-days: # optional
82+
# The level of compression for Zlib to be applied to the artifact archive. The value can range from 0 to 9: - 0: No compression - 1: Best speed - 6: Default compression (same as GNU Gzip) - 9: Best compression Higher levels will result in better compression, but will take longer to complete. For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads.
83+
84+
compression-level: # optional, default is 6
85+
# If true, an artifact with a matching name will be deleted before a new one is uploaded. If false, the action will fail if an artifact for the given name already exists. Does not fail if the artifact does not exist.
86+
87+
overwrite: # optional, default is false
88+
# If true, hidden files will be included in the artifact. If false, hidden files will be excluded from the artifact.
89+
90+
include-hidden-files: # optional, default is false
91+
92+
93+
- name: Setup Java JDK
94+
uses: actions/setup-java@v3.14.1
95+
with:
96+
# The Java version to set up. Takes a whole or semver Java version. See examples of supported syntax in README file
97+
java-version: # optional
98+
# The path to the `.java-version` file. See examples of supported syntax in README file
99+
java-version-file: # optional
100+
# Java distribution. See the list of supported distributions in README file
101+
distribution:
102+
# The package type (jdk, jre, jdk+fx, jre+fx)
103+
java-package: # optional, default is jdk
104+
# The architecture of the package (defaults to the action runner's architecture)
105+
architecture: # optional
106+
# Path to where the compressed JDK is located
107+
jdkFile: # optional
108+
# Set this option if you want the action to check for the latest available version that satisfies the version spec
109+
check-latest: # optional
110+
# ID of the distributionManagement repository in the pom.xml file. Default is `github`
111+
server-id: # optional, default is github
112+
# Environment variable name for the username for authentication to the Apache Maven repository. Default is $GITHUB_ACTOR
113+
server-username: # optional, default is GITHUB_ACTOR
114+
# Environment variable name for password or token for authentication to the Apache Maven repository. Default is $GITHUB_TOKEN
115+
server-password: # optional, default is GITHUB_TOKEN
116+
# Path to where the settings.xml file will be written. Default is ~/.m2.
117+
settings-path: # optional
118+
# Overwrite the settings.xml file if it exists. Default is "true".
119+
overwrite-settings: # optional, default is true
120+
# GPG private key to import. Default is empty string.
121+
gpg-private-key: # optional
122+
# Environment variable name for the GPG private key passphrase. Default is $GPG_PASSPHRASE.
123+
gpg-passphrase: # optional
124+
# Name of the build platform to cache dependencies. It can be "maven", "gradle" or "sbt".
125+
cache: # optional
126+
# Workaround to pass job status to post job step. This variable is not intended for manual setting
127+
job-status: # optional, default is ${{ job.status }}
128+
# The token used to authenticate when fetching version manifests hosted on github.com, such as for the Microsoft Build of OpenJDK. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
129+
token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }}
130+
# Name of Maven Toolchain ID if the default name of "${distribution}_${java-version}" is not wanted. See examples of supported syntax in Advanced Usage file
131+
mvn-toolchain-id: # optional
132+
# Name of Maven Toolchain Vendor if the default name of "${distribution}" is not wanted. See examples of supported syntax in Advanced Usage file
133+
mvn-toolchain-vendor: # optional
134+
135+
- name: Setup Go environment
136+
uses: actions/setup-go@v5.5.0
137+
with:
138+
# The Go version to download (if necessary) and use. Supports semver spec and ranges. Be sure to enclose this option in single quotation marks.
139+
go-version: # optional
140+
# Path to the go.mod or go.work file.
141+
go-version-file: # optional
142+
# Set this option to true if you want the action to always check for the latest available version that satisfies the version spec
143+
check-latest: # optional
144+
# Used to pull Go distributions from go-versions. Since there's a default, this is typically not supplied by the user. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
145+
token: # optional, default is ${{ github.server_url == 'https://github.com' && github.token || '' }}
146+
# Used to specify whether caching is needed. Set to true, if you'd like to enable caching.
147+
cache: # optional, default is true
148+
# Used to specify the path to a dependency file - go.sum
149+
cache-dependency-path: # optional
150+
# Target architecture for Go to use. Examples: x86, x64. Will use system architecture by default.
151+
architecture: # optional
152+
153+
- name: Close Stale Issues
154+
uses: actions/stale@v9.1.0
155+
with:
156+
# Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`.
157+
repo-token: # optional, default is ${{ github.token }}
158+
# The message to post on the issue when tagging it. If none provided, will not mark issues stale.
159+
stale-issue-message: # optional
160+
# The message to post on the pull request when tagging it. If none provided, will not mark pull requests stale.
161+
stale-pr-message: # optional
162+
# The message to post on the issue when closing it. If none provided, will not comment when closing an issue.
163+
close-issue-message: # optional
164+
# The message to post on the pull request when closing it. If none provided, will not comment when closing a pull requests.
165+
close-pr-message: # optional
166+
# The number of days old an issue or a pull request can be before marking it stale. Set to -1 to never mark issues or pull requests as stale automatically.
167+
days-before-stale: # optional, default is 60
168+
# The number of days old an issue can be before marking it stale. Set to -1 to never mark issues as stale automatically. Override "days-before-stale" option regarding only the issues.
169+
days-before-issue-stale: # optional
170+
# The number of days old a pull request can be before marking it stale. Set to -1 to never mark pull requests as stale automatically. Override "days-before-stale" option regarding only the pull requests.
171+
days-before-pr-stale: # optional
172+
# The number of days to wait to close an issue or a pull request after it being marked stale. Set to -1 to never close stale issues or pull requests.
173+
days-before-close: # optional, default is 7
174+
# The number of days to wait to close an issue after it being marked stale. Set to -1 to never close stale issues. Override "days-before-close" option regarding only the issues.
175+
days-before-issue-close: # optional
176+
# The number of days to wait to close a pull request after it being marked stale. Set to -1 to never close stale pull requests. Override "days-before-close" option regarding only the pull requests.
177+
days-before-pr-close: # optional
178+
# The label to apply when an issue is stale.
179+
stale-issue-label: # optional, default is Stale
180+
# The label to apply when an issue is closed.
181+
close-issue-label: # optional
182+
# The labels that mean an issue is exempt from being marked stale. Separate multiple labels with commas (eg. "label1,label2").
183+
exempt-issue-labels: # optional, default is
184+
# The reason to use when closing an issue.
185+
close-issue-reason: # optional, default is not_planned
186+
# The label to apply when a pull request is stale.
187+
stale-pr-label: # optional, default is Stale
188+
# The label to apply when a pull request is closed.
189+
close-pr-label: # optional
190+
# The labels that mean a pull request is exempt from being marked as stale. Separate multiple labels with commas (eg. "label1,label2").
191+
exempt-pr-labels: # optional, default is
192+
# The milestones that mean an issue or a pull request is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2").
193+
exempt-milestones: # optional, default is
194+
# The milestones that mean an issue is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). Override "exempt-milestones" option regarding only the issues.
195+
exempt-issue-milestones: # optional, default is
196+
# The milestones that mean a pull request is exempt from being marked as stale. Separate multiple milestones with commas (eg. "milestone1,milestone2"). Override "exempt-milestones" option regarding only the pull requests.
197+
exempt-pr-milestones: # optional, default is
198+
# Exempt all issues and pull requests with milestones from being marked as stale. Default to false.
199+
exempt-all-milestones: # optional, default is false
200+
# Exempt all issues with milestones from being marked as stale. Override "exempt-all-milestones" option regarding only the issues.
201+
exempt-all-issue-milestones: # optional, default is
202+
# Exempt all pull requests with milestones from being marked as stale. Override "exempt-all-milestones" option regarding only the pull requests.
203+
exempt-all-pr-milestones: # optional, default is
204+
# Only issues or pull requests with all of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels.
205+
only-labels: # optional, default is
206+
# Only issues or pull requests with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels.
207+
any-of-labels: # optional, default is
208+
# Only issues with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. Override "any-of-labels" option regarding only the issues.
209+
any-of-issue-labels: # optional, default is
210+
# Only pull requests with at least one of these labels are checked if stale. Defaults to `` (disabled) and can be a comma-separated list of labels. Override "any-of-labels" option regarding only the pull requests.
211+
any-of-pr-labels: # optional, default is
212+
# Only issues with all of these labels are checked if stale. Defaults to `[]` (disabled) and can be a comma-separated list of labels. Override "only-labels" option regarding only the issues.
213+
only-issue-labels: # optional, default is
214+
# Only pull requests with all of these labels are checked if stale. Defaults to `[]` (disabled) and can be a comma-separated list of labels. Override "only-labels" option regarding only the pull requests.
215+
only-pr-labels: # optional, default is
216+
# The maximum number of operations per run, used to control rate limiting (GitHub API CRUD related).
217+
operations-per-run: # optional, default is 30
218+
# Remove stale labels from issues and pull requests when they are updated or commented on.
219+
remove-stale-when-updated: # optional, default is true
220+
# Remove stale labels from issues when they are updated or commented on. Override "remove-stale-when-updated" option regarding only the issues.
221+
remove-issue-stale-when-updated: # optional, default is
222+
# Remove stale labels from pull requests when they are updated or commented on. Override "remove-stale-when-updated" option regarding only the pull requests.
223+
remove-pr-stale-when-updated: # optional, default is
224+
# Run the processor in debug mode without actually performing any operations on live issues.
225+
debug-only: # optional, default is false
226+
# The order to get issues or pull requests. Defaults to false, which is descending.
227+
ascending: # optional, default is false
228+
# Delete the git branch after closing a stale pull request.
229+
delete-branch: # optional, default is false
230+
# The date used to skip the stale action on issue/pull request created before it (ISO 8601 or RFC 2822).
231+
start-date: # optional, default is
232+
# The assignees which exempt an issue or a pull request from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2").
233+
exempt-assignees: # optional, default is
234+
# The assignees which exempt an issue from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2"). Override "exempt-assignees" option regarding only the issues.
235+
exempt-issue-assignees: # optional, default is
236+
# The assignees which exempt a pull request from being marked as stale. Separate multiple assignees with commas (eg. "user1,user2"). Override "exempt-assignees" option regarding only the pull requests.
237+
exempt-pr-assignees: # optional, default is
238+
# Exempt all issues and pull requests with assignees from being marked as stale. Default to false.
239+
exempt-all-assignees: # optional, default is false
240+
# Exempt all issues with assignees from being marked as stale. Override "exempt-all-assignees" option regarding only the issues.
241+
exempt-all-issue-assignees: # optional, default is
242+
# Exempt all pull requests with assignees from being marked as stale. Override "exempt-all-assignees" option regarding only the pull requests.
243+
exempt-all-pr-assignees: # optional, default is
244+
# Exempt draft pull requests from being marked as stale. Default to false.
245+
exempt-draft-pr: # optional, default is false
246+
# Display some statistics at the end regarding the stale workflow (only when the logs are enabled).
247+
enable-statistics: # optional, default is true
248+
# A comma delimited list of labels to add when an issue or pull request becomes unstale.
249+
labels-to-add-when-unstale: # optional, default is
250+
# A comma delimited list of labels to remove when an issue or pull request becomes stale.
251+
labels-to-remove-when-stale: # optional, default is
252+
# A comma delimited list of labels to remove when an issue or pull request becomes unstale.
253+
labels-to-remove-when-unstale: # optional, default is
254+
# Any update (update/comment) can reset the stale idle time on the issues and pull requests.
255+
ignore-updates: # optional, default is false
256+
# Any update (update/comment) can reset the stale idle time on the issues. Override "ignore-updates" option regarding only the issues.
257+
ignore-issue-updates: # optional, default is
258+
# Any update (update/comment) can reset the stale idle time on the pull requests. Override "ignore-updates" option regarding only the pull requests.
259+
ignore-pr-updates: # optional, default is
260+
# Only the issues or the pull requests with an assignee will be marked as stale automatically.
261+
include-only-assigned: # optional, default is false
262+

0 commit comments

Comments
 (0)