Some config fixes for CI Actions (#3) #21
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: UI Tests | |
on: [push] | |
#workflow_dispatch | |
jobs: | |
ui-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check Docker version | |
run: docker version | |
- name: Check Docker Compose version | |
run: docker compose version | |
- name: Checkout gh-pages repository to GitHub runner | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
path: ./.github/gh-pages | |
- name: Run UI-tests via docker-compose | |
env: | |
LOGIN: ${{ secrets.LOGIN }} | |
PASSWORD: ${{ secrets.PASSWORD }} | |
run: | | |
docker compose up --exit-code-from ui-tests || exit_code=$? | |
echo "exit_code=${exit_code}" >> $GITHUB_ENV | |
- name: Check container logs | |
run: docker compose logs | |
- name: List Allure results | |
run: ls -la allure-results | |
- name: Copy history from gh-pages to allure-results | |
run: | | |
mkdir -p allure-results/history | |
if [ -d ".github/gh-pages/history" ]; then | |
cp -R ./.github/gh-pages/history/* allure-results/history/ | |
fi | |
- name: Generate Allure report | |
run: | | |
echo "Generating Allure report..." | |
docker compose run ui-tests /bin/sh -c "allure generate allure-results --clean -o allure-report" | |
- name: Update Allure history | |
run: | | |
cp -R allure-report/history/* ./.github/gh-pages/history/ || true | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
token: ${{ secrets.CI_TOKEN }} | |
branch: gh-pages | |
folder: allure-report |