Skip to content

fix 12

fix 12 #17

Workflow file for this run

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 ../..
find ../ -not -type d
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'