Github Action Unit Test: Test Crew Update, crew upgrade, crew install vim (#8907)

* Github Action Unit Test testing

* add CREW_BRANCH

* simplify

* make reporting more verbose

* Actually run the test!

* intentionally bump version
This commit is contained in:
Satadru Pramanik, DO, MPH, MEng
2023-11-08 09:21:41 -05:00
committed by GitHub
parent 72f1bcb76d
commit f85c0c8edf
3 changed files with 28 additions and 1 deletions

View File

@@ -54,3 +54,7 @@ jobs:
needs: handoff
if: contains(needs.handoff.outputs.category, 'YAML')
uses: ./.github/workflows/YAMLlint.yml
test:
needs: handoff
if: contains(needs.handoff.outputs.category, 'Ruby')
uses: ./.github/workflows/Unit-Test.yml

23
.github/workflows/Unit-Test.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Run Unit Tests on PR
on:
pull_request:
branches: [master]
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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.actor }}\" && \
echo \"CREW_BRANCH is ${{ github.head_ref }}\" && \
CREW_REPO=https://github.com/${{ github.actor }}/chromebrew.git CREW_BRANCH=${{ github.head_ref }} crew update && \
yes | crew upgrade && \
yes | crew install vim"

View File

@@ -1,6 +1,6 @@
# lib/const.rb
# Defines common constants used in different parts of crew
CREW_VERSION = '1.38.9'
CREW_VERSION = '1.38.10'
# kernel architecture
KERN_ARCH = `uname -m`.chomp