RDKBACCL-326: Bundlegen support for BPI R4. #152
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: L1 unit test | |
on: | |
push: | |
branches: [ master, main, 'sprint/**', 'release/**' ] | |
pull_request: | |
# By default: opened, synchronize, or reopened | |
branches: [ master, main, 'sprint/**', 'release/**' ] | |
jobs: | |
L1-unit-test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout this repository | |
echo "Checkout this repo" | |
uses: actions/checkout@v3 | |
with: | |
path: Bundlegen | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.x' | |
- run: pip install -r Bundlegen/requirements.txt | |
pip install --editable Bundlegen/ | |
pip install coverage | |
- name: Setup umoci | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.20.x' | |
check-latest: true | |
cache: false | |
- run: | | |
sudo apt update | |
sudo apt upgrade -y | |
sudo apt install -y make git go-md2man | |
# Build/install umoci | |
echo "Printing GO version " | |
go version | |
GOPATH=$HOME/go | |
cd $GOPATH | |
git clone https://github.com/opencontainers/umoci.git | |
cd $GOPATH/umoci/ | |
echo $(ls) | |
make | |
sudo make install | |
echo 'Finished Job of UMOCI' | |
- name: Setup skopeo | |
if: ${{ env.ACT }} | |
run: | | |
echo 'Installing skopeo' | |
. /etc/os-release && \ | |
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" && \ | |
sudo wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O- | sudo apt-key add - && \ | |
sudo apt update && apt install -y skopeo | |
echo 'Finished Installing skopeo' | |
- name: Run the unit test | |
working-directory: ./Bundlegen/unit_tests/L1_testing | |
run: | | |
python run_L1_test.py -c coverage_report | |
- name: Upload artifacts | |
if: ${{ !env.ACT }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts | |
path: | | |
Bundlegen/unit_tests/L1_testing/test_files/htmlcov/* | |
if-no-files-found: warn |