Feat/use stripe customer portal #679
This file contains hidden or 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.13"] | |
| node: ["18"] | |
| browser: ["chrome", "firefox"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install Python ${{ matrix.python }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Run 'poetry install' | |
| run: | | |
| pip install poetry | |
| poetry install | |
| - name: Install Chrome Webdriver | |
| if: ${{ matrix.browser == 'chrome' }} | |
| run: | | |
| sudo apt-get install -y google-chrome-stable | |
| poetry run seleniumbase install chromedriver | |
| - 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 | |
| sudo apt-get install -y firefox | |
| poetry run seleniumbase install geckodriver | |
| - 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: | |
| poetry run black --exclude 'migrations' --check . | |
| - name: Run 'pytest' | |
| env: | |
| SELENIUM_WEBDRIVER: ${{ matrix.browser }} | |
| ENABLE_GEOCACHE_TEST: '1' | |
| DJANGO_SETTINGS_MODULE: 'MemberManagement.test_settings' | |
| run: poetry run pytest --time-limit=300 | |
| 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 |