use Texture
for ReactionInput
and Compound
#2572
Workflow file for this run
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
# Copyright 2020 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 ] | |
jobs: | |
test_ord_schema: | |
runs-on: ubuntu-latest | |
env: | |
PGDATA: $GITHUB_WORKSPACE/rdkit-postgres | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
- name: Setup PostgreSQL | |
shell: bash -l {0} | |
run: | | |
# NOTE(skearnes): conda is only used for postgres (not python). | |
conda install -c rdkit rdkit-postgresql==2020.03.3.0 | |
initdb | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install ord_schema | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install wheel | |
python -m pip install .[tests] | |
- name: Run tests | |
shell: bash -l {0} | |
run: | | |
coverage erase | |
pytest -n auto -vv --cov=ord_schema --durations=0 --durations-min=1 | |
coverage xml | |
- uses: codecov/codecov-action@v1 | |
test_notebooks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install ord_schema | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install wheel | |
python -m pip install .[examples,tests] | |
- name: Test notebooks | |
run: | | |
treon | |
test_proto_wrappers: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install protoc | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install wheel | |
mkdir protoc | |
cd protoc | |
wget https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-x86_64.zip | |
unzip protoc-22.3-linux-x86_64.zip | |
wget https://github.com/protocolbuffers/protobuf-javascript/releases/download/v3.21.2/protobuf-javascript-3.21.2-linux-x86_64.zip | |
unzip protobuf-javascript-3.21.2-linux-x86_64.zip | |
PATH=$GITHUB_WORKSPACE/protoc/bin:$PATH protoc --version | |
- name: Run protoc | |
run: | | |
PATH=$GITHUB_WORKSPACE/protoc/bin:$PATH ./compile_proto_wrappers.sh | |
./format.sh # Add license headers. | |
- name: Check for drift | |
run: | | |
# Ignore the copyright line in the diff so the year can change. | |
[[ -z $(git diff -I "^(#| \*) Copyright") ]] || { echo "proto wrappers do not match:\n$(git diff)"; exit 1; } | |
test_js: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Test NPM package | |
run: | | |
cd js/ord-schema | |
npm install-test | |
test_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Test bump patch version | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
python -m pip install bump2version | |
bump2version patch --verbose | |
- name: Test python | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade build twine wheel | |
python -m build | |
- name: Test javascript | |
run: | | |
cd js/ord-schema | |
npm install | |
npm run build | |
npm publish --dry-run |