-
Notifications
You must be signed in to change notification settings - Fork 1
96 lines (92 loc) · 2.6 KB
/
main.yaml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Test projects integrity
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies and set up the environment
run: |
python -m venv .venv
source .venv/bin/activate
pip install prettytable
pip install requests
chmod +x mud.sh
echo "$PWD" >> $GITHUB_PATH
- name: Create repositories
run: |
git config --global user.name "Jasur Sadikov"
git config --global user.email "[email protected]"
for i in {1..3}; do
mkdir "repo_$i"
cd "repo_$i"
echo "repo_$i" > test.txt
git init
git add .
git commit -m "Initial commit"
cd ..
done
- name: Set up and Initialize
run: |
echo -e "[mud]\nrun_async = False\nrun_table = True\nauto_fetch = False\nnerd_fonts = False" > ~/.mudsettings
./mud.sh init
- name: Test remove by path
run: |
for i in {1..3}; do
./mud.sh remove repo_$i
done
- name: Test add with label
run: |
for i in {1..3}; do
./mud.sh add label_$i repo_$i
done
- name: Test remove label
run: |
for i in {1..3}; do
./mud.sh remove label_$i
done
- name: Add all repositories with labels
run: |
rm .mudconfig
./mud.sh init
for i in {1..3}; do
./mud.sh add label_$i repo_$i
done
- name: Test default commands
run: |
echo "mud labels"
./mud.sh labels
echo "mud status"
./mud.sh status
echo "mud info"
./mud.sh info
echo "mud log"
./mud.sh log
echo "mud branch"
./mud.sh branch
echo "mud tags"
./mud.sh tags
- name: Test custom command
run: ./mud.sh echo "Hello world"
- name: Test label filtering
run: ./mud.sh -l=label_1 echo "Hello world"
- name: Test branch filtering
run: |
./mud.sh -l=label_1 git checkout -b develop
./mud.sh -b=develop echo "Hello world"
- name: Test update feature
run: |
./mud.sh update
# git reset --hard HEAD^1
# ./mud.sh update
# git pull --force