-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #559 from sheriferson/feature/github-actions
Python 3.9/3.11 support, dropping Python 3.6 support, and moving to GitHub Actions
- Loading branch information
Showing
31 changed files
with
237 additions
and
129 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: ci/github-actions | ||
|
||
on: | ||
pull_request: | ||
branches: [ master, feature/** ] | ||
|
||
push: | ||
branches: [ master, feature/** ] | ||
|
||
|
||
jobs: | ||
run-light-tests: | ||
env: | ||
SKIP_LIMS: true | ||
TEST_INHOUSE: false | ||
ALLOW_TEST_DOWNLOADS: false | ||
TEST_API_ENDPOINT: "http://api.brain-map.org" | ||
IPFX_TEST_TIMEOUT: 60 | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y hdf5-tools curl | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install allensdk | ||
- name: Run tests | ||
run: | | ||
pip install -r requirements-test.txt | ||
mkdir -p test-results | ||
git lfs install | ||
git config lfs.url 'https://github.com/AllenInstitute/ipfx.git/info/lfs' | ||
git lfs env | ||
git lfs pull | ||
python -m pytest --junitxml=test-results/junit.xml --verbose | ||
onprem-tests: | ||
name: on-prem tests | ||
runs-on: ["self-hosted"] | ||
strategy: | ||
matrix: | ||
image: ["ipfx_py39:latest", "ipfx_py311:latest"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: run test in docker | ||
run: | | ||
docker run \ | ||
--env-file ~/env.list \ | ||
--mount type=bind,source=$PWD,target=/local1/github_worker,bind-propagation=rshared \ | ||
-v /data/informatics/module_test_data/:/data/informatics/module_test_data/ \ | ||
-v /allen/aibs/informatics/module_test_data/:/allen/aibs/informatics/module_test_data/ \ | ||
-v /allen/programs/celltypes/production/mousecelltypes/:/allen/programs/celltypes/production/mousecelltypes/ \ | ||
-v /allen/programs/celltypes/workgroups/279/:/allen/programs/celltypes/workgroups/279/ \ | ||
-v /allen/programs/celltypes/production/humancelltypes/:/allen/programs/celltypes/production/humancelltypes/ \ | ||
--workdir /local1/github_worker --rm \ | ||
--user 1001:1001 \ | ||
${{ matrix.image }} \ | ||
/bin/bash -c "python -m venv .venv; \ | ||
source .venv/bin/activate; \ | ||
pip install --upgrade pip; \ | ||
pip install numpy; \ | ||
pip install -r requirements.txt; \ | ||
export TEST_API_ENDPOINT=http://api.brain-map.org; \ | ||
export SKIP_LIMS=false; \ | ||
export TEST_INHOUSE=true; \ | ||
export ALLOW_TEST_DOWNLOADS=true; \ | ||
export IPFX_TEST_TIMEOUT=60; \ | ||
pip install -r requirements-test.txt; \ | ||
git config lfs.url 'https://github.com/AllenInstitute/ipfx.git/info/lfs'; \ | ||
git lfs env; \ | ||
git lfs pull; \ | ||
python -m pytest \ | ||
--junitxml=test-reports/test.xml --verbose" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: IPFX Nightly onprem tests | ||
on: | ||
schedule: | ||
- cron: '05 6 * * *' | ||
|
||
|
||
jobs: | ||
onprem: | ||
name: on-prem tests | ||
runs-on: ["self-hosted"] | ||
strategy: | ||
matrix: | ||
image: ["ipfx_py39:latest", "ipfx_py311:latest"] | ||
branch: ["master", "feature/**"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ matrix.branch }} | ||
- name: run test in docker | ||
run: | | ||
docker run \ | ||
--mount type=bind,source=$PWD,target=/local1/github_worker,bind-propagation=rshared \ | ||
-v /data/informatics/module_test_data/:/data/informatics/module_test_data/ \ | ||
-v /allen/aibs/informatics/module_test_data/:/allen/aibs/informatics/module_test_data/ \ | ||
-v /allen/programs/celltypes/production/mousecelltypes/:/allen/programs/celltypes/production/mousecelltypes/ \ | ||
-v /allen/programs/celltypes/workgroups/279/:/allen/programs/celltypes/workgroups/279/ \ | ||
-v /allen/programs/celltypes/production/humancelltypes/:/allen/programs/celltypes/production/humancelltypes/ \ | ||
--workdir /local1/github_worker --rm \ | ||
--user 1001:1001 \ | ||
${{ matrix.image }} \ | ||
/bin/bash -c "python -m venv .venv; \ | ||
source .venv/bin/activate; \ | ||
pip install --upgrade pip; \ | ||
pip install numpy; \ | ||
pip install -r requirements.txt; \ | ||
export TEST_API_ENDPOINT=http://api.brain-map.org; \ | ||
pip install -r requirements-test.txt; \ | ||
git config lfs.url 'https://github.com/AllenInstitute/ipfx.git/info/lfs'; \ | ||
git lfs env; \ | ||
git lfs pull; \ | ||
python -m pytest \ | ||
--junitxml=test-reports/test.xml --verbose" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ Credits | |
* Nile Graddis @nilegraddis | ||
* Sergey Gratiy @sgratiy | ||
* Yang Yu @gnayuy | ||
* Sherif Soliman @sheriferson |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Docker images for on premise testing | ||
|
||
This directory contains Dockerfiles for building images for running on-prem tests that require internal Allen Institute resources. On-prem tests use GitHub self-hosted runners that will run tests on docker images built from these Dockerfiles. | ||
|
||
Our light and on-prem tests are defined in [our workflow file](../.github/workflows/github-actions-ci.yml "Link to GitHub Actions workflow for light and on-prem tests"). | ||
|
||
- See [here](https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners) for more information on self-hosted runners. | ||
- See [here](https://docs.github.com/en/actions/hosting-your-own-runners/adding-self-hosted-runners) for more information on adding self-hosted runners to a GitHub repository. | ||
|
||
## Building images | ||
|
||
If you are an Allen Institute developer, you will have instructions on how to access the machine running the IPFX self-hosted runner. | ||
|
||
On this machine you can create the Docker image corresponding to the Python versions we test on by running: | ||
|
||
``` | ||
cd ipfx/docker/py39 | ||
docker build -t ipfx_py39:latest . | ||
``` | ||
|
||
And this should be sufficient for the on-prem tests defined in our GitHub workflow to 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM python:3.11 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
hdf5-tools \ | ||
curl \ | ||
git-lfs \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN curl https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
FROM python:3.6 | ||
FROM python:3.9 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
hdf5-tools \ | ||
curl | ||
curl \ | ||
git-lfs \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN curl https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash | ||
|
||
RUN apt-get install git-lfs | ||
RUN curl https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.8 | ||
2.0.0 |
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
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
argschema<2.0.0 | ||
allensdk | ||
argschema | ||
dictdiffer | ||
h5py==2.10.0 | ||
marshmallow==3.0.0rc6 | ||
matplotlib>=1.4.3 | ||
h5py | ||
marshmallow | ||
matplotlib | ||
methodtools | ||
numpy>=1.15.4,<1.19.0 | ||
pandas>=0.25.1,<=0.25.3 | ||
numpy | ||
pandas | ||
pg8000 | ||
pillow | ||
pyabf<2.3.0 | ||
pynwb>=1.3.2,<2.0.0 | ||
pyYAML<6.0.0 | ||
scipy>=0.15.1 | ||
simplejson>=3.10.0 | ||
pyabf | ||
pynwb==2.2.0 | ||
pyYAML | ||
ruamel.yaml<0.18.0 | ||
scipy | ||
simplejson | ||
watchdog |
Oops, something went wrong.