Skip to content

Migrate frontend from Vue to React + TypeScript + react-query #48

Migrate frontend from Vue to React + TypeScript + react-query

Migrate frontend from Vue to React + TypeScript + react-query #48

Workflow file for this run

# Copyright 2026 Open Reaction Database Project Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Tests
on:
pull_request:
push:
branches:
- main
jobs:
test_ord_interface:
strategy:
matrix:
os: ["ubuntu-latest", "macos-14"]
python-version: ["3.11", "3.12", "3.13", "3.14"]
runs-on: ${{ matrix.os }}
env:
PGDATA: $GITHUB_WORKSPACE/rdkit-postgres
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: 'latest'
- name: Setup PostgreSQL
shell: bash -l {0}
run: |
# NOTE(skearnes): conda is only used for postgres (not python).
conda install -c conda-forge rdkit-postgresql
initdb
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: actions-setup-redis
uses: shogo82148/actions-setup-redis@v1.35.0
- name: Install ord_interface
run: uv sync --frozen
- name: Run tests
shell: bash -l {0}
run: |
uv run coverage erase
uv run pytest -vv --cov=ord_interface --durations=20 --ignore=ord_interface/editor
uv run coverage xml
# Codecov uses CODECOV_TOKEN when set. Do not fail the job when uploads cannot authenticate:
# fork PRs (tokenless), Dependabot PRs (no repo secrets + protected dependabot/* branches).
# Pushes to main and normal same-repo PRs stay strict.
- uses: codecov/codecov-action@v5
with:
files: coverage.xml
fail_ci_if_error: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot/')) }}
token: ${{ secrets.CODECOV_TOKEN }}
test_app:
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
# NOTE(skearnes): Docker is not supported on macOS GitLab runners.
# NOTE(skearnes): ubuntu-latest AppArmor doesn't play nicely with puppeteer.
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- uses: actions/setup-node@v4
- name: actions-setup-redis
uses: shogo82148/actions-setup-redis@v1.35.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install ord-interface
run: uv sync --frozen
- name: Install non-python test dependencies
run: |
cd "${GITHUB_WORKSPACE}/ord_interface"
npm install puppeteer
- name: Run tests
run: |
cd "${GITHUB_WORKSPACE}/ord_interface"
uv run ./run_tests.sh