Skip to content

Commit a0b4304

Browse files
committed
workflow test
1 parent 4b0afa0 commit a0b4304

File tree

3 files changed

+33
-4
lines changed

3 files changed

+33
-4
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
on: [push]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Install Prerequisits
8+
run: |
9+
sudo apt-get update
10+
sudo apt-get install -y asciidoc python3-pygit2
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
- name: Test
16+
run: |
17+
git config --global user.email "[email protected]"
18+
git config --global user.name "Test User"
19+
gpg --batch --gen-key .github/workflows/testkey.conf
20+
make KEY:=$(gpg --list-keys --with-colons | awk -F: '/^pub/ {print $5; exit}') test

.github/workflows/testkey.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
%no-protection
2+
Key-Type: RSA
3+
Key-Length: 2048
4+
Subkey-Type: RSA
5+
Subkey-Length: 2048
6+
Name-Real: Test User
7+
Name-Email: [email protected]
8+
Expire-Date: 0
9+
%commit

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ test: man
2525
git ls-remote $(TESTREPO)
2626
git incrypt init $(REPO) $(KEY)
2727
git -C $(TESTREPO) fetch $(REPO) || git -C $(TESTREPO) incrypt trust $(REPO)
28-
git -C $(TESTREPO) push $(VERBOSE) $(REPO) master~2:refs/heads/master
28+
git -C $(TESTREPO) push $(VERBOSE) $(REPO) HEAD~2:refs/heads/master
2929
git clone $(VERBOSE) $(REPO) tst
3030
git -C $(TESTREPO) push $(VERBOSE) $(REPO) v0.9.0
3131
git -C tst pull $(VERBOSE)
32-
git -C $(TESTREPO) push $(VERBOSE) $(REPO) master
33-
git -C tst pull $(VERBOSE)
34-
git -C $(TESTREPO) push $(VERBOSE) --all $(REPO)
32+
git -C $(TESTREPO) push $(VERBOSE) $(REPO) HEAD:master
3533
git -C tst pull $(VERBOSE)
34+
git -C $(TESTREPO) push $(VERBOSE) -f --all $(REPO)
35+
git -C tst pull --no-rebase -X theirs --no-edit $(VERBOSE)
3636
git ls-remote crypt
3737
git -C tst ls-remote $(REPO)
3838
git ls-remote tst

0 commit comments

Comments
 (0)