Skip to content

Commit

Permalink
move integration to separate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rayg1234 committed Jun 21, 2024
1 parent ddcbb1d commit 213e257
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 5 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: integration-test

on:
push:
paths: # this will only trigger on changes to the demo directory, add more here if required
- 'src/fairchem/demo/**'
workflow_call:

jobs:
test:
runs-on: ubuntu-latest # TODO add macos tests too
strategy:
max-parallel: 10
matrix:
python_version: ['3.9', '3.11']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}

- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install core dependencies and package
run: |
python -m pip install --upgrade pip
if [ -f packages/requirements.txt ]; then pip install -r packages/requirements.txt; fi
if [ -f packages/requirements-optional.txt ]; then pip install -r packages/requirements-optional.txt; fi
pip install -e packages/fairchem-core[dev]
pip install -e packages/fairchem-data-oc[dev]
pip install -e packages/fairchem-demo-ocpapi[dev]
pip install -e packages/fairchem-applications-cattsunami
- name: Integration tests
continue-on-error: true
run: | # skip-ocpapi-integration skips expensive tests with the tag "@pytest.mark.ocpapi_integration_test"
pytest tests/demo/ocpapi/tests/integration/ --skip-ocpapi-integration -c ./packages/fairchem-core/pyproject.toml
5 changes: 0 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ jobs:
run: |
pytest tests -vv --ignore=tests/demo/ocpapi/tests/integration/ --cov-report=xml --cov=fairchem -c ./packages/fairchem-core/pyproject.toml
- name: Integration tests
continue-on-error: true
run: |
pytest tests/demo/ocpapi/tests/integration/ -c ./packages/fairchem-core/pyproject.toml
- if: ${{ matrix.python_version == '3.11' }}
name: codecov-report
uses: codecov/codecov-action@v4
Expand Down

0 comments on commit 213e257

Please sign in to comment.