up back deps #189
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: 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@v4 | |
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@v3 | |
with: | |
node-version: '18' | |
- 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@v3 | |
with: | |
name: htmlcoverage | |
path: htmlcov |