Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jagapiou committed Dec 9, 2024
1 parent 18451dc commit d8f1c15
Show file tree
Hide file tree
Showing 7 changed files with 3,844 additions and 76 deletions.
5 changes: 2 additions & 3 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# limitations under the License.
#
# Set up devcontainer

set -e
pip install -e .[dev]
pip install -r examples/requirements.txt
pip install --require-virtualenv --require-hashes -r requirements.txt
pip install --require-virtualenv --no-deps --no-index --no-build-isolation --editable .
57 changes: 0 additions & 57 deletions .github/actions/install-examples/action.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: install-concordia
name: install

inputs:
python-version:
Expand Down Expand Up @@ -34,14 +34,14 @@ runs:
else
exit 1
fi
echo "key=${name}-${version}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('setup.py') }}" >> $GITHUB_OUTPUT
echo "key=${name}-${version}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}" >> $GITHUB_OUTPUT
- name: Restore Concordia installation
- name: Restore venv
id: restore
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: venv
key: install-concordia-${{ steps.cache-key.outputs.key }}
key: venv-${{ steps.cache-key.outputs.key }}

- name: Create venv
if: steps.restore.outputs.cache-hit != 'true'
Expand All @@ -54,11 +54,12 @@ runs:
run: |
echo "${PWD}/venv/bin" >> $GITHUB_PATH
- name: Install Concordia
- name: Install
if: steps.restore.outputs.cache-hit != 'true'
shell: bash
run: |
pip install --editable .[dev]
pip install --require-hashes -r requirements.txt
pip install --no-deps --no-index --no-build-isolation --editable .
- name: Show installation
shell: bash
Expand All @@ -75,7 +76,7 @@ runs:
pytype --version
pip list
- name: Save Concordia installation
- name: Save venv
if: steps.restore.outputs.cache-hit != 'true'
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test-concordia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@ on:
branches:
- main
paths:
- '.github/actions/install-concordia/action.yml'
- '.github/actions/install/action.yml'
- '.github/workflows/test-concordia.yml'
- '.pylintrc'
- 'concordia/**'
- 'pyproject.toml'
- 'requirements.txt'
- 'setup.py'
pull_request:
branches:
- main
paths:
- '.github/actions/install-concordia/action.yml'
- '.github/actions/install/action.yml'
- '.github/workflows/test-concordia.yml'
- '.pylintrc'
- 'concordia/**'
- 'pyproject.toml'
- 'requirements.txt'
- 'setup.py'
workflow_dispatch:

Expand All @@ -38,7 +40,7 @@ jobs:
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938

- name: Install Concordia
uses: ./.github/actions/install-concordia
uses: ./.github/actions/install

- name: Test Concordia
run: pytest concordia
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ on:
branches:
- main
paths:
- '.github/actions/install-examples/action.yml'
- '.github/actions/install-concordia/action.yml'
- '.github/actions/install/action.yml'
- '.github/workflows/test-examples.yml'
- '.pylintrc'
- 'concordia/**'
- 'examples/**'
- 'pyproject.toml'
- 'requirements.txt'
- 'setup.py'
pull_request:
branches:
- main
paths:
- '.github/actions/install-examples.yml'
- '.github/actions/install-concordia.yml'
- '.github/actions/install/action.yml'
- '.github/workflows/test-examples.yml'
- '.pylintrc'
- 'concordia/**'
- 'examples/**'
- 'pyproject.toml'
- 'requirements.txt'
- 'setup.py'
workflow_dispatch:

Expand All @@ -42,8 +42,8 @@ jobs:
- name: Checkout Concordia
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938

- name: Install examples
uses: ./.github/actions/install-examples
- name: Install Concordia
uses: ./.github/actions/install

- name: Test examples
run: pytest examples
Expand Down
10 changes: 10 additions & 0 deletions examples/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Requirements for the Concordia examples.
absl-py
docstring-parser
immutabledict
IPython
matplotlib
ml_collections
numpy
sentence-transformers
termcolor
Loading

0 comments on commit d8f1c15

Please sign in to comment.