Skip to content

ci: add CI workflow for tests, format check, and static analysis#75

Merged
fredeil merged 2 commits into
masterfrom
copilot/add-ci-workflow-for-tests
Feb 26, 2026
Merged

ci: add CI workflow for tests, format check, and static analysis#75
fredeil merged 2 commits into
masterfrom
copilot/add-ci-workflow-for-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 26, 2026

No CI workflow existed, so code changes were never automatically verified on PRs or pushes to master.

Changes

  • .github/workflows/ci.yml — triggers on push/PR to master; runs dart pub get, dart format check, dart analyze --fatal-infos, and dart test
  • PermissionsGITHUB_TOKEN scoped to contents: read (least privilege)

Uses only actions/checkout@v4 and dart-lang/setup-dart@v1; no new dependencies.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Repo Assist] ci: add CI workflow for tests, format check, and static analysis</issue_title>
<issue_description>🤖 This PR was created by Repo Assist, an automated AI assistant for this repository.

The repository currently has no CI workflow that runs on pull requests or pushes to master. This means code changes are never automatically verified in CI.

This PR adds .github/workflows/ci.yml, a minimal CI workflow that runs on every push to master and every PR targeting master.

What it does

- dart pub get          # install dependencies
- dart format --output=none --set-exit-if-changed .  # check formatting
- dart analyze --fatal-infos   # static analysis
- dart test             # run test suite

These are exactly the same commands documented in .github/copilot-instructions.md and used for local development.

Rationale

  • Prevents regressions: Automatically catches broken tests before merging.
  • Enforces style: dart format check prevents unformatted code from entering the codebase.
  • Zero new dependencies: Uses only dart-lang/setup-dart@v1 (official Dart team action) and actions/checkout@v4 (GitHub standard action).
  • Minimal change: 18 lines added, no existing files modified.

Closes #71
Supersedes #73

Test Status

This PR only adds a workflow file — no Dart code changes. The workflow itself cannot be executed in the current sandbox environment, but its contents are identical to the commands documented in copilot-instructions.md and verified to work locally in this repo.

Generated by Repo Assist

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@ee49512da7887942965ac0a0e48357106313c9dd. View source at https://github.com/githubnext/agentics/tree/ee49512da7887942965ac0a0e48357106313c9dd/workflows/repo-assist.md.


[!NOTE]
This was originally intended as a pull request, but the git push operation failed.

Workflow Run: View run details and download patch artifact

The patch file is available in the agent-artifacts artifact in the workflow run linked above.

To apply the patch locally:

# Download the artifact from the workflow run https://github.com/fredeil/email-validator.dart/actions/runs/22389617204
# (Use GitHub MCP tools if gh CLI is not available)
gh run download 22389617204 -n agent-artifacts -D /tmp/agent-artifacts-22389617204

# The patch file will be at agent-artifacts/tmp/gh-aw/aw-repo-assist-ci-workflow-2026-02-25b.patch after download
# Apply the patch (--3way handles cross-repo patches where files may already exist)
git am --3way /tmp/agent-artifacts-22389617204/aw-repo-assist-ci-workflow-2026-02-25b.patch
Show patch (49 lines)
From aabc8aaa368bd477f7133cc122642e4e3bab2bad Mon Sep 17 00:00:00 2001
From: Repo Assist <repo-assist@github.com>
Date: Wed, 25 Feb 2026 09:02:39 +0000
Subject: [PATCH] ci: add CI workflow to run tests, format check, and analysis
 on PRs

Adds .github/workflows/ci.yml that runs on every push/PR to master:
- dart pub get
- dart format check (fail if files not formatted)
- dart analyze --fatal-infos (static analysis)
- dart test (run test suite)

Ensures code quality is verified automatically on every contribution.
Fixes fredeil/email-validator.dart#71

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
 .github/workflows/ci.yml | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 .github/workflows/ci.yml

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..d39a3fc
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,18 @@
+name: CI
+
+on:
+  push:
+    branches: [master]
+  pull_request:
+    branches: [master]
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: dart-lang/setup-dart@v1
+      - run: dart pub get
+      - run: dart format --output=none --set-exit-if-changed .
+      - run: dart analyze --fatal-infos
+      - run: dart test
-- 
2.52.0

<agent_instructions>Implement the repo assist recommendations</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: fredeil <17533404+fredeil@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CI workflow for tests, format check, and static analysis ci: add CI workflow for tests, format check, and static analysis Feb 26, 2026
@fredeil fredeil marked this pull request as ready for review February 26, 2026 10:27
Copilot AI review requested due to automatic review settings February 26, 2026 10:27
@fredeil fredeil merged commit 113ef06 into master Feb 26, 2026
12 of 13 checks passed
@fredeil fredeil deleted the copilot/add-ci-workflow-for-tests branch February 26, 2026 10:27
Copilot AI review requested due to automatic review settings March 23, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants