Skip to content

Update github actions #190

Update github actions

Update github actions #190

Workflow file for this run

name: Selenium
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
selenium:
name: selenium
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.10'
# @see https://github.com/GoogleChromeLabs/chrome-for-testing
- name: Install ChromeDriver
run: |
CHROME_VERSION=$(google-chrome --version | cut -f 3 -d ' ' | cut -d '.' -f 1)
CHROMEDRIVER_RELEASE=$(curl --location --fail --retry 3 https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_${CHROME_VERSION})
curl --silent --show-error --location --fail --retry 3 --output /tmp/chromedriver_linux64.zip "https://storage.googleapis.com/chrome-for-testing-public/$CHROMEDRIVER_RELEASE/linux64/chromedriver-linux64.zip"
unzip /tmp/chromedriver_linux64.zip
sudo mv chromedriver-linux64/chromedriver /usr/local/bin/chromedriver
sudo chmod +x /usr/local/bin/chromedriver
- name: Install Node JS
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install NPM dependencies and build dist
run: |
npm ci
npm run dist
- name: Update pip and install Tox
run: |
pip install --upgrade pip setuptools wheel
pip install tox
- name: Copy django settings
run: cp folioblog/settings/local.py.dist folioblog/settings/local.py
- name: Run all test
run: tox -e report_all
env:
FOLIOBLOG_SECRET_KEY: Mo4ocFeHT5Yi0hRyodrO
- name: Make Selenium Badge
uses: action-badges/[email protected]
with:
label: end2end
file-name: selenium.svg
badge-branch: badges
github-token: '${{ secrets.GITHUB_TOKEN }}'
coverage-file-name: ./coverage.xml
- name: Archive HTML coverage
uses: actions/upload-artifact@v4
with:
name: htmlcoverage
path: htmlcov