Skip to content

Commit

Permalink
Force absolute paths and test install of package
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems committed Dec 24, 2023
1 parent 7131506 commit 961aef9
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,41 @@ jobs:
exists rmall/bar_0.0.0-1_rmall.ipk
exists rm1/bar_0.0.0-1_rm1.ipk
exists rm2/bar_0.0.0-1_rm2.ipk
test-install:
name: Test install of built package
runs-on: ubuntu-20.04
steps:
- name: Checkout the Git repository
uses: actions/checkout@v4
- uses: ./
with:
arch: rmall
package: foo
- name: Validate output
shell: bash
run: |
source lib.sh
cd dist
tree .
exists rmall/foo_0.0.0-1_rmall.ipk
missing rm1/foo_0.0.0-1_rm1.ipk
missing rm2/foo_0.0.0-1_rm2.ipk
missing rmall/bar_0.0.0-1_rmall.ipk
missing rm1/bar_0.0.0-1_rm1.ipk
missing rm2/bar_0.0.0-1_rm2.ipk
- uses: Eeems-Org/run-in-remarkable-action@v1
with:
setup: |
set -ex
echo "src/gz local-rmall file:///opt/tmp/src" > /opt/etc/opkg.conf.d/16-local.conf
run: |
set -ex
echo Y | toltecctl generate-opkg-conf
opkg update
opkg install foo
if ! [ -f /foo ]; then
echo "/foo not found!"
exit 1
fi
opkg remove foo
path: ${{ steps.download.outputs.download-path }}
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ runs:
run: |
toltecmk \
${{ inputs.verbose && '--verbose' || '' }} \
--work-dir "$work_dir" \
--dist-dir "$dist_dir" \
--work-dir "$(realpath "$work_dir")" \
--dist-dir "$(realpath "$dist_dir")" \
--warnings "$warnings" \
${{ join(fromJSON(steps.args.outputs.arch), ' ') }} \
${{ join(fromJSON(steps.args.outputs.package), ' ') }} \
Expand Down
4 changes: 2 additions & 2 deletions package
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ build() {
foo() {
pkgdesc="Foo"
package() {
true
touch "$pkgdir"/foo
}
}
bar() {
pkgdesc="Bar"
package() {
true
touch "$pkgdir"/bar
}
}

0 comments on commit 961aef9

Please sign in to comment.