Files
chromebrew/.github/workflows/Unit-Test.yml
Satadru Pramanik, DO, MPH, MEng 4921e4656e Add build check to Github Actions, and make getrealdeps.rb failure trigger crew error (#9319)
* Add build check to Github Actions, and make getrealdeps.rb failure trigger crew abort

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* bump version

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
2024-02-13 01:23:43 -06:00

29 lines
1.1 KiB
YAML

---
name: Run Unit Tests on PR
on: workflow_call
jobs:
container_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dump github context
run: echo "$GITHUB_CONTEXT"
shell: bash
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
- name: Unit Tests
run: |
sudo docker run -t satmandu/crewbuild:amd64 sudo -i -u chronos /bin/bash -c "
echo \"CREW_REPO is ${{ github.event.pull_request.head.repo.clone_url }}\" && \
echo \"CREW_BRANCH is ${{ github.head_ref }}\" && \
CREW_REPO=${{ github.event.pull_request.head.repo.clone_url }} CREW_BRANCH=${{ github.head_ref }} crew update && \
yes | crew upgrade && \
yes | crew install vim && \
yes | crew remove vim && \
cd ../tests && \
./prop_test && \
cd ~ && \
git clone --depth=1 https://github.com/chromebrew/chromebrew.git build_test && \
cd build_test && \
yes | crew build -f packages/hello_world_chromebrew.rb"