Skip to content

Commit

Permalink
feature: add ci.yml file
Browse files Browse the repository at this point in the history
- validate linting and tests before merge requests
  • Loading branch information
esmaeil-ahmadipour committed Nov 22, 2024
1 parent a738afe commit f5cabe5
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Linting & Tests Validation
on:
pull_request:
branches:
- develop
jobs:
lint_and_test:

This comment has been minimized.

Copy link
@phoenixit99

phoenixit99 Nov 22, 2024

We need to separate the job between lint and test

This comment has been minimized.

Copy link
@esmaeil-ahmadipour

esmaeil-ahmadipour Nov 22, 2024

Author Collaborator

@phoenixit99 : These CI settings can be significantly improved and expanded. Before merging, ensuring linting and tests pass gives reviewers clear visibility. We also need to plan for actions after the merge. This will be improved further later.

runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.5'
- name: Install dependencies
run: flutter pub get
- name: Run Flutter Analyze
run: flutter analyze
- name: Run tests
run: flutter test
merge_check:
runs-on: ubuntu-latest
needs: lint_and_test
if: ${{ success() }}

This comment has been minimized.

Copy link
@phoenixit99

phoenixit99 Nov 22, 2024

Can we integrate with Discord or Telegram to alert us when a job fails? We can use a Discord bot or a Telegram bot to notify us of job failures or successes.

This comment has been minimized.

Copy link
@esmaeil-ahmadipour

esmaeil-ahmadipour Nov 22, 2024

Author Collaborator

@phoenixit99 : Perfect. We can create it as a task on the GitHub board and proceed with it. please write it in backlog in trello .

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Merge Pull Request

This comment has been minimized.

Copy link
@phoenixit99

phoenixit99 Nov 22, 2024

Should we need one more step to deploy ?

This comment has been minimized.

Copy link
@esmaeil-ahmadipour

esmaeil-ahmadipour Nov 22, 2024

Author Collaborator

@phoenixit99 This will be improved further later.

run: echo "Linting and tests passed successfully.Merge request is ready for merge"

0 comments on commit f5cabe5

Please sign in to comment.