Skip to content

Commit

Permalink
update local docker test instructions to match GH Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nllong committed Feb 1, 2021
1 parent bbc1643 commit 327a709
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ To develop locally the following dependency stack is recommended.

#### Run Docker Compose

```
```bash
docker-compose build
```
... [be patient](https://www.youtube.com/watch?v=f4hkPn0Un_Q) ... If the containers build successfully start them by
Expand All @@ -70,7 +70,8 @@ where 4 is equal to the number of worker nodes you wish to run. For single node
than the total number of available cores minus 4.

Resetting the containers can be accomplished by running:
```

```bash
docker-compose rm -f
docker volume rm osdata dbdata
docker volume create --name=osdata
Expand All @@ -86,19 +87,21 @@ Congratulations! Visit `http://localhost:8080` to see the OpenStudio Server Mana

#### Running the Docker CI testing locally

```
```bash
export OPENSTUDIO_TAG=develop
export RAILS_ENV=docker-test

docker-compose rm -f
docker volume rm osdata
docker volume create --name=osdata
export RAILS_ENV=docker-test
sed -i -E "s/.git//g" .dockerignore
docker-compose -f docker-compose.test.yml build --build-arg OPENSTUDIO_VERSION=develop
docker-compose -f docker-compose.test.yml run web
# in another terminal (or detach previous commands)
docker-compose -f docker-compose.test.yml run worker
git checkout -- Dockerfile .dockerignore
docker volume create --name=osdata
docker-compose -f docker-compose.test.yml pull
docker-compose -f docker-compose.test.yml build --build-arg OPENSTUDIO_VERSION=$OPENSTUDIO_TAG
docker-compose -f docker-compose.test.yml up -d
docker-compose exec -T web /usr/local/bin/run-server-tests
docker-compose stop
git checkout -- .dockerignore && git checkout -- Dockerfile
docker-compose rm -f
```


Expand Down Expand Up @@ -151,7 +154,7 @@ instillation provided in the OpenStudio installer package.

### OSX

```
```bash
# Change directory to the install location of the Server
cd /Applications/OpenStudio-X.Y.Z/ParametricAnalysisTool.app/Contents/Resources/OpenStudio-server
rm -rf /gems # Remove the pre-packaged gems
Expand Down
2 changes: 1 addition & 1 deletion docker/server/run-server-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ do
done

#cd /opt/openstudio/server && bundle exec rspec; (( exit_status = exit_status || $? ))
# Run only the alorgithm specs. The other features/*_spec files should probably disappear and capybara/gecko
# Run only the algorithm specs. The other features/*_spec files should probably disappear and capybara/gecko
# can be removed.
cd /opt/openstudio/server && bundle exec rspec spec/features/openstudio_algo_spec.rb; (( exit_status = exit_status || $? ))
#cd /opt/openstudio/server && bundle exec rake rubocop:run; (( exit_status = exit_status || $? ))
Expand Down

0 comments on commit 327a709

Please sign in to comment.