-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 1.87 KB
/
development_workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Development Build, Test, and Merge
on:
push:
branches:
- development
jobs:
build-test-and-merge:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
# Replace with your actual test command, e.g., pytest
echo "Running tests!"
- name: Debug information
run: |
echo "GitHub Ref: ${{ github.ref_name }}"
echo "GitHub Ref: ${{ github.ref }}"
echo "GitHub Event Name: ${{ github.event_name }}"
echo "GitHub Repository: ${{ github.repository }}"
git status
git log -2
- name: Fetch all branches
run: |
git fetch --all
git checkout main
git branch -a
- name: Show recent commits on development
run: |
git checkout development
git log -5 --oneline
- name: Show recent commits on main
run: |
git checkout main
git log -5 --oneline
- name: Compare branches
run: |
git checkout main
git diff --name-status development..main
- name: Auto-merge to main if tests pass
if: ${{ success() }}
uses: peter-evans/create-pull-request@v3
with:
branch: merge-to-main-${{ github.ref_name }}
commit-message: Merge development into main
title: '[AUTO-MERGE] Merge from Development to Main'
body: |
This is an automated pull request to update from branch development to main.
base: main
labels: automerge