-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into features/662-freebusy
- Loading branch information
Showing
123 changed files
with
9,560 additions
and
1,863 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: nightly-tests | ||
|
||
concurrency: | ||
group: nightly-tests | ||
cancel-in-progress: true | ||
|
||
on: | ||
schedule: | ||
# run every day at 1am UTC (8PM EST) | ||
- cron: '0 1 * * *' | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read # This is required for actions/checkout | ||
|
||
jobs: | ||
prod-sanity-browserstack: | ||
name: prod-sanity-browserstack | ||
runs-on: ubuntu-latest | ||
environment: production | ||
env: | ||
APPT_PROD_LOGIN_EMAIL: ${{ secrets.E2E_APPT_PROD_LOGIN_EMAIL }} | ||
APPT_PROD_LOGIN_PWORD: ${{ secrets.E2E_APPT_PROD_LOGIN_PASSWORD }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
cache-dependency-path: 'test/e2e/package-lock.json' | ||
|
||
- name: Install dependencies | ||
run: | | ||
cd ./test/e2e | ||
npm install | ||
- name: BrowserStack Env Setup | ||
uses: browserstack/github-actions/setup-env@master | ||
with: | ||
username: ${{ secrets.BROWSERSTACK_USERNAME }} | ||
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | ||
project-name: 'Thunderbird Appointment' | ||
build-name: 'Nightly Tests: BUILD_INFO' | ||
|
||
- name: Run Playwright Tests on Browserstack | ||
run: | | ||
cd ./test/e2e | ||
cp .env.example .env | ||
npm run prod-sanity-test-browserstack-gha |
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
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
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
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
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
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
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
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
41 changes: 41 additions & 0 deletions
41
backend/src/appointment/commands/generate_documentation_pages.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import os | ||
|
||
import markupsafe | ||
import requests | ||
import markdown | ||
|
||
|
||
def open_or_get(path: str): | ||
if path.startswith('http'): | ||
return requests.get(path).text | ||
|
||
# Otherwise it's a path | ||
with open(path, 'r') as fh: | ||
return fh.read() | ||
|
||
|
||
def run(): | ||
"""Helper function to generate documentation/help pages into plain html | ||
""" | ||
print('Fetching documentation...') | ||
|
||
# Attr_List: In-case remote markdown has attributes | ||
# TOC: For ids on headers | ||
extensions = ['markdown.extensions.attr_list', 'markdown.extensions.toc'] | ||
# Only english for now. There's no german TB privacy policy? | ||
locales = ['en'] | ||
|
||
for locale in locales: | ||
using_zoom_doc = f'../docs/zoom/{locale}/using-zoom.md' | ||
|
||
os.makedirs(f'{os.path.dirname(__file__)}/../tmp/docs/{locale}', exist_ok=True) | ||
|
||
if using_zoom_doc: | ||
print('Using zoom doc found.') | ||
contents = open_or_get(using_zoom_doc) | ||
html = markupsafe.Markup(markdown.markdown(contents, extensions=extensions)) | ||
|
||
with open(f'{os.path.dirname(__file__)}/../tmp/docs/{locale}/using-zoom.html', 'w') as fh: | ||
fh.write(html) | ||
|
||
print('Done! Copy them over to the frontend/src/assets/docs!') |
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
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
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
Oops, something went wrong.