Skip to content

Remove debug line now that it works #31

Remove debug line now that it works

Remove debug line now that it works #31

Workflow file for this run

name: build
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
jobs:
test-basic:
name: Test basic
runs-on: ubuntu-20.04
steps:
- name: Checkout the Git repository
uses: actions/checkout@v4
- uses: ./
- name: Validate output
shell: bash
run: |
source lib.sh
cd dist
tree .
exists rmall/foo_0.0.0-1_rmall.ipk
exists rm1/foo_0.0.0-1_rm1.ipk
exists rm2/foo_0.0.0-1_rm2.ipk
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-path:
name: Test path
runs-on: ubuntu-20.04
steps:
- name: Checkout the Git repository
uses: actions/checkout@v4
- name: Setup test folder
shell: bash
run: |
mkdir test
cp -l package test/package
- uses: ./
with:
path: ${{ github.workspace }}/test
- name: Validate output
shell: bash
run: |
source lib.sh
cd test/dist
tree .
exists rmall/foo_0.0.0-1_rmall.ipk
exists rm1/foo_0.0.0-1_rm1.ipk
exists rm2/foo_0.0.0-1_rm2.ipk
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-vebose:
name: Test verbose
runs-on: ubuntu-20.04
steps:
- name: Checkout the Git repository
uses: actions/checkout@v4
- uses: ./
with:
verbose: true
- name: Validate output
shell: bash
run: |
source lib.sh
cd dist
tree .
exists rmall/foo_0.0.0-1_rmall.ipk
exists rm1/foo_0.0.0-1_rm1.ipk
exists rm2/foo_0.0.0-1_rm2.ipk
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-arch:
name: Test arch
runs-on: ubuntu-20.04
steps:
- name: Checkout the Git repository
uses: actions/checkout@v4
- uses: ./
with:
arch: rmall
- 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
exists 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
test-package:
name: Test package
runs-on: ubuntu-20.04
steps:
- name: Checkout the Git repository
uses: actions/checkout@v4
- uses: ./
with:
package: foo
- name: Validate output
shell: bash
run: |
source lib.sh
cd dist
tree .
exists rmall/foo_0.0.0-1_rmall.ipk
exists rm1/foo_0.0.0-1_rm1.ipk
exists 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
test-warnings:
name: Test warnings
runs-on: ubuntu-20.04
steps:
- name: Checkout the Git repository
uses: actions/checkout@v4
- uses: ./
with:
warnings: error
- name: Validate output
shell: bash
run: |
source lib.sh
cd dist
tree .
exists rmall/foo_0.0.0-1_rmall.ipk
exists rm1/foo_0.0.0-1_rm1.ipk
exists rm2/foo_0.0.0-1_rm2.ipk
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
- uses: Eeems-Org/run-in-remarkable-action@v1
with:
path: dist/rmall
setup: |
set -ex
echo "src/gz local-rmall file:///opt/tmp/src" > /opt/etc/opkg.conf.d/16-local.conf
run: |
set -ex
if [ -f /foo ]; then
echo "::error::/foo found before package installed!"
exit 1
fi
echo Y | toltecctl generate-opkg-conf
opkg update
opkg install foo
if ! [ -f /foo ]; then
echo "::error::/foo not found after package install!"
exit 1
fi
opkg remove foo
if [ -f /foo ]; then
echo "::error::/foo found after package removed!"
exit 1
fi