Skip to content

Commit

Permalink
GitHub Actions Self-Hosted runner tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdez99 committed Aug 22, 2024
1 parent 6b76f9d commit 85413ae
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/CHANGE-PASSWORD-Smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ jobs:
sudo yum install -y wget
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
sudo yum localinstall -y google-chrome-stable_current_x86_64.rpm
- name: Download and install ChromeDriver
run: |
CHROME_MAIN_VERSION=$(google-chrome-stable --version | sed 's/Google Chrome //g' | sed 's/ .*//g' | cut -d'.' -f1)
DRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_MAIN_VERSION")
curl "https://chromedriver.storage.googleapis.com/$DRIVER_VERSION/chromedriver_linux64.zip" -O
unzip chromedriver_linux64.zip -d /usr/local/bin/
chmod +x /usr/local/bin/chromedriver
- name: Replace variables in cloudEnv.properties
run: |
sed -i "s/SIDE_DOOR_USERNAME/${{ secrets.SIDEDOORUSERNAME }}/g" src/main/resources/conf/cloudEnv.properties
Expand Down Expand Up @@ -80,8 +87,15 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
sed -i '1s/.*/<h1>CHANGE PASSWORD Smoke Test Results<\/h1>/' changePassword-smoke-test-results.html
echo "<h3><a href='${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html'>Test Report ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html</a></h3>" >> changePassword-smoke-test-results.html
git add changePassword-smoke-test-results.html
git commit -m "Update changePassword-smoke-test-results.html"
if [[ -f "changePassword-smoke-test-results.html" ]]; then
sed -i '1s/.*/<h1>CHANGE PASSWORD Smoke Test Results<\/h1>/' changePassword-smoke-test-results.html
echo "<h3><a href='${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html'>Test Report ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html</a></h3>" >> changePassword-smoke-test-results.html
git add changePassword-smoke-test-results.html
git commit -m "Update changePassword-smoke-test-results.html"
else
echo "<h1>CHANGE PASSWORD Smoke Test Results</h1>" > changePassword-smoke-test-results.html
echo "<h3><a href='${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html'>Test Report ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html</a></h3>" >> changePassword-smoke-test-results.html
git add changePassword-smoke-test-results.html
git commit -m "Create and update changePassword-smoke-test-results.html"
fi
git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages

0 comments on commit 85413ae

Please sign in to comment.