-
Notifications
You must be signed in to change notification settings - Fork 1
98 lines (93 loc) · 2.4 KB
/
test.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
97
98
name: Test
on:
push:
branches:
- '*'
pull_request:
branches:
- master
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install dependencies and set up the environment
run: |
python -m pip install -r requirements.txt
python -m pip install requests build
python -m build
pip install dist/*.whl
- name: Create repositories
run: |
git config --global user.name "Jasur Sadikov"
git config --global user.email "test@test.com"
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: Initialize
run: |
mud init
- name: Test remove by path
run: |
for i in {1..3}; do
mud remove repo_$i
done
- name: Test add with label
run: |
for i in {1..3}; do
mud add label_$i repo_$i
done
mud lb
- name: Test remove label
run: |
for i in {1..3}; do
mud remove label_$i
done
mud lb
- name: Add all repositories with labels
run: |
rm .mudconfig
mud init
for i in {1..3}; do
mud add label_$i repo_$i
done
mud lb
- name: Test default commands
run: |
echo "mud labels"
mud labels
echo "mud status"
mud status
echo "mud info"
mud info
echo "mud log"
mud log
echo "mud branch"
mud branch
echo "mud tags"
mud tags
- name: Test custom command
run: |
mud echo "Hello world"
mud -a echo "Hello world"
mud -a -t echo "Hello world"
mud -t echo "Hello world"
mud -t -c='echo "Hello" && echo "world"'
- name: Test label filtering
run: mud -l=label_1 echo "Hello world"
- name: Test branch filtering
run: |
mud -l=label_1 git checkout -b develop
mud -b=develop echo "Hello world"