Skip to content

Commit

Permalink
test enable AudioTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhsu committed May 29, 2024
1 parent e1dde11 commit 61e757e
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 15 deletions.
35 changes: 21 additions & 14 deletions .github/actions/run-unit-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,41 @@ name: "Run Unit Test And Coverage Report"
runs:
using: "composite"
steps:
- name: "Setup Git Information"
- name: "Show ENV"
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
echo "========================="
echo $HOME
echo "========================="
- name: "Prepare Building Environment"
shell: bash
run: |
apt-get update -yqq
apt-get install apt-transport-https -yqq
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | tee /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add
apt-get update
apt-get -y install sbt
apt-get -y install xorg-dev libglu1-mesa libgl1-mesa-dev xvfb libxinerama1 libxcursor1 libswt-gtk-4-java libswt-gtk-4-jni libxml2-utils bc zip
apt-get -yq update
apt-get -yq install curl xorg-dev libglu1-mesa libgl1-mesa-dev xvfb libxinerama1 libxcursor1 libswt-gtk-4-java libswt-gtk-4-jni libxml2-utils bc zip apt-transport-https gnupg git locales-all
echo "deb https://deb.debian.org/debian unstable main non-free contrib" > /etc/apt/sources.list.d/openjdk.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" > /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" > /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add
apt-get -yq update
apt-get -yq install openjdk-11-jdk sbt
- name: "Setup Git Information"
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
- name: "Run Unit Test and Coverage Report"
shell: bash
run: |
./distclean
xvfb-run --auto-servernum sbt coverage test coverageAggregate
xvfb-run --auto-servernum sbt coverage test coverageAggregate -Duser.home=/tmp/pulse-home
- name: "Archive Test Reports"
- name: Archive Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: target/test-reports-html/


16 changes: 16 additions & 0 deletions .github/actions/upload-testing-report/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Upload Testing Report"
runs:
using: "composite"
steps:
- name: 'Archive Testing Report'
shell: bash
run: |
tar -cvzf test-report.tar.gz -C target/ test-reports-html/
- name: 'Upload Testing Report to GitHub Workflow'
uses: actions/upload-artifact@v4
with:
name: test-report.tar.gz
path: test-report.tar.gz


17 changes: 16 additions & 1 deletion .github/workflows/unitTest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,29 @@ jobs:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
EXCLUDE_TEST_TAG: moe.brianhsu.AudioOutputTest
LANG: en_US.utf-8
HOME: /root
container:
image: openjdk:11
image: debian:sid
steps:
- name: "Checkout Source Code"
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install pulseaudio
run: |
apt-get -yq update
apt-get -yq install pulseaudio
- name: Start pulseaudio
run: |
pulseaudio &
- name: List sound card
run: |
pactl list
- name: Unit test
uses: ./.github/actions/run-unit-test

0 comments on commit 61e757e

Please sign in to comment.