build(deps): bump micromatch from 4.0.5 to 4.0.8 #544
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: CI | |
on: [push, pull_request] | |
jobs: | |
integration: | |
name: Integration Tests (${{ matrix.browser }}, Python ${{ matrix.python }}, Node ${{ matrix.node }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.10"] | |
node: ["16"] | |
browser: ["chrome", "firefox"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Chrome Webdriver | |
if: ${{ matrix.browser == 'chrome' }} | |
run: | | |
python3 -m venv venv | |
source venv/bin/activate | |
pip install seleniumbase | |
sudo apt-get install -y google-chrome-stable | |
seleniumbase install chromedriver | |
deactivate | |
rm -rf venv | |
- name: Install Firefox Webdriver | |
if: ${{ matrix.browser == 'firefox' }} | |
run: | | |
# Python by default installs from snap. | |
# This isn't supported by geckodriver. | |
# | |
# The clean solution would be to use a sane distribution | |
# that doesn't use snap-based firefox by default. | |
# But GitHub Actions doesn't offer this. | |
sudo add-apt-repository ppa:mozillateam/ppa | |
sudo apt-get -qq -y update | |
echo ' | |
Package: * | |
Pin: release o=LP-PPA-mozillateam | |
Pin-Priority: 1001 | |
Package: firefox | |
Pin: version 1:1snap1-0ubuntu2 | |
Pin-Priority: -1 | |
' | sudo tee /etc/apt/preferences.d/mozilla-firefox > /dev/null | |
sudo apt-get -y install firefox | |
python3 -m venv venv | |
source venv/bin/activate | |
sudo apt-get install -y firefox | |
pip install seleniumbase | |
seleniumbase install geckodriver | |
deactivate | |
rm -rf venv | |
- name: Run 'poetry install' | |
run: | | |
pip install poetry | |
poetry config virtualenvs.create false | |
poetry install | |
- name: Install Node ${{ matrix.node }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Run 'yarn install' | |
run: yarn install | |
- name: Run 'yarn build' | |
run: yarn build | |
- name: Check if 'black' has been run | |
run: | |
black --exclude 'migrations' --check . | |
- name: Run 'pytest' | |
env: | |
SELENIUM_WEBDRIVER: ${{ matrix.browser }} | |
ENABLE_GEOCACHE_TEST: '1' | |
run: pytest | |
smoke: | |
name: Docker Smoke Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Build Docker Container' | |
run: docker build -t jacobsalumni/membermanagement . | |
- name: 'Run Docker Container' | |
run: | | |
docker run --rm -d --name=smoke -e DJANGO_SECRET_KEY=smoke -p 8080:80 jacobsalumni/membermanagement | |
sleep 10 | |
- name: 'Check that the healthcheck API responds' | |
run: | | |
curl http://localhost:8080/healthcheck/ | |
curl -L http://localhost:8080/healthcheck/static | |
docker stop smoke |