Add import annotations #305
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: test_svelte_frontend | |
on: | |
push: | |
paths: | |
- burny_common/** | |
- fastapi_server/** | |
- poetry.lock | |
- svelte_frontend/** | |
- .github/workflows/test_svelte_frontend.yml | |
pull_request: | |
branches: | |
- master | |
- develop | |
env: | |
SUBDIRECTORY: svelte_frontend | |
BACKEND_SUBDIRECTORY: fastapi_server | |
jobs: | |
test_svelte_frontend: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
node: ['19'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
# https://earthly.dev/get-earthly | |
- name: Install Earthly | |
run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete' | |
- name: Install | |
working-directory: ${{ env.SUBDIRECTORY }} | |
run: earthly +install-all --verbose true --NODEVERSION=${{ matrix.node }} | |
- name: Run code checks and tests | |
working-directory: ${{ env.SUBDIRECTORY }} | |
run: earthly +all --verbose true --NODEVERSION=${{ matrix.node }} | |
test_integration_via_earthly: | |
needs: [test_svelte_frontend] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.10', '3.11'] | |
node: ['19'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
# https://earthly.dev/get-earthly | |
- name: Install Earthly | |
run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete' | |
- name: Install | |
working-directory: ${{ env.BACKEND_SUBDIRECTORY }} | |
run: earthly +install-integration --verbose true --PYTHONVERSION=${{ matrix.python-version }} --NODEVERSION=${{ matrix.node }} | |
- name: Run integration-tests | |
working-directory: ${{ env.BACKEND_SUBDIRECTORY }} | |
run: earthly +integration-test --verbose true --PYTHONVERSION=${{ matrix.python-version }} --NODEVERSION=${{ matrix.node }} | |
test_integration: | |
needs: [test_svelte_frontend] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.10', '3.11'] | |
node: ['19'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Node ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install Poetry | |
run: pip install poetry | |
- name: Install python dependencies | |
working-directory: ${{ env.BACKEND_SUBDIRECTORY }} | |
run: poetry install | |
- name: Install playwright dependencies | |
working-directory: ${{ env.BACKEND_SUBDIRECTORY }} | |
run: poetry run playwright install --with-deps chromium | |
- name: Install npm dependencies | |
working-directory: ${{ env.SUBDIRECTORY }} | |
run: npm install | |
- name: Run integration test | |
working-directory: ${{ env.BACKEND_SUBDIRECTORY }} | |
run: sh run_integration_test.sh |