forked from jiro4989/build-rpm-action
-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (100 loc) · 3.34 KB
/
test.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
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
99
100
101
102
103
104
name: Test
on:
push:
pull_request:
jobs:
test-tools:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jiro4989/setup-nim-action@v1
- run: |
cd tools
nimble test -Y
test-script:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
mkdir -p .rpmpkg/usr/bin
mkdir -p .rpmpkg/usr/lib/testbin
echo -e "echo hello" > .rpmpkg/usr/bin/testbin
echo -e "echo hello2" > .rpmpkg/usr/bin/testbin2
echo -e "a=1" > .rpmpkg/usr/lib/testbin/testbin.conf
chmod +x .rpmpkg/usr/bin/*
docker image ls
docker search tfh-rpm-action
- uses: ./
with:
summary: 'testbin is a test script'
package: testbin
package_root: .rpmpkg
maintainer: jiro4989
version: 'v1.0.0'
arch: 'x86_64'
desc: |
This is sample package. This is sample package.
This is sample package.
This is sample package.
id: build
- run: |
docker run --rm -v $PWD:/work -t team-fuho/tfh-rpm-action:latest bash -c 'rpm -Uvh /work/*.rpm && testbin'
- name: Test file_name
run: test ${{ steps.build.outputs.file_name }} = 'testbin-1.0.0-1.el7.x86_64.rpm'
- name: Test debuginfo_file_name
run: test ${{ steps.build.outputs.debuginfo_file_name }} = 'testbin-debuginfo-1.0.0-1.el7.x86_64.rpm'
test-script-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
mkdir -p .rpmpkg/usr/bin
mkdir -p .rpmpkg/usr/lib/testbin
echo -e "echo hello" > .rpmpkg/usr/bin/testbin
echo -e "echo hello2" > .rpmpkg/usr/bin/testbin2
echo -e "a=1" > .rpmpkg/usr/lib/testbin/testbin.conf
chmod +x .rpmpkg/usr/bin/*
- uses: team-fuho/tfh-rpm-action@master
with:
summary: 'testbin is a test script'
package: testbin
package_root: .rpmpkg
maintainer: jiro4989
version: 'v1.0.0'
arch: 'x86_64'
desc: 'test package'
- run: |
pwd || :
ls / || :
ls /work || :
ls /tmp/ || :
ls /tmp/work || :
ls ../.. || :
find ../ -not -type d || :
docker image ls
docker run --rm -v $PWD:/work -t team-fuho/tfh-rpm-action:latest bash -c 'rpm -Uvh /work/*.rpm && testbin'
test-github-refs-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
mkdir -p .rpmpkg/usr/bin
mkdir -p .rpmpkg/usr/lib/testbin
echo -e "echo hello" > .rpmpkg/usr/bin/testbin
echo -e "echo hello2" > .rpmpkg/usr/bin/testbin2
echo -e "a=1" > .rpmpkg/usr/lib/testbin/testbin.conf
chmod +x .rpmpkg/usr/bin/*
- uses: ./
with:
summary: 'testbin is a test script'
package: testbin
package_root: .rpmpkg
maintainer: jiro4989
version: 'refs/tags/v1.0.0'
arch: 'x86_64'
desc: 'test package'
post: 'echo post1'
# build_requires: 'perl-Git = 2.43.0'
# requires: 'git-core = 2.43.0'
- run: |
docker run --rm -v $PWD:/work -t team-fuho/tfh-rpm-action:latest bash -c 'rpm -Uvh /work/*.rpm && testbin'