-
Notifications
You must be signed in to change notification settings - Fork 13
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 #247 from simonsobs/develop
Release v0.3.0
- Loading branch information
Showing
131 changed files
with
10,882 additions
and
1,320 deletions.
There are no files selected for viewing
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,11 +1,4 @@ | ||
[run] | ||
source = socs | ||
|
||
omit = | ||
# omit versioneer | ||
*/_version.py | ||
|
||
[paths] | ||
source = | ||
socs/ | ||
/app/socs/socs/ | ||
./ | ||
/app/socs/ |
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,146 @@ | ||
name: Deploy Builds | ||
|
||
on: | ||
release: | ||
types: [ released ] | ||
|
||
jobs: | ||
test: | ||
name: pytest with coverage | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install system packages | ||
run: | | ||
sudo apt-get install -y socat | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
# (start steps from pytest workflow) | ||
# Install | ||
- name: Install so3g | ||
run: | | ||
pip3 install so3g | ||
# Fetch all history for all tags and branches | ||
- name: clone socs | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install socs | ||
run: | | ||
pip3 install -r requirements.txt | ||
pip3 install -e . | ||
# Unit Tests | ||
- name: Run unit tests | ||
working-directory: ./tests | ||
run: | | ||
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not integtest' | ||
- name: Build docker test images | ||
run: | | ||
docker-compose build socs | ||
# Integration Tests | ||
- name: Build images for integration tests | ||
run: | | ||
docker-compose build ocs-lakeshore372-simulator | ||
- name: Run integration tests | ||
working-directory: ./tests | ||
run: | | ||
COVERAGE_FILE=.coverage.int python3 -m pytest --cov -m 'integtest' | ||
# Coverage | ||
- name: Report test coverage | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
mv ./tests/.coverage.* ./ | ||
pip install coveralls | ||
coverage combine | ||
coverage report | ||
coveralls --service=github | ||
# (end steps from pytest workflow) | ||
|
||
docker: | ||
name: build and deploy docker images | ||
needs: test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Fetch all history for all tags and branches | ||
- name: clone socs | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Dockerize | ||
- name: Build docker images | ||
run: | | ||
docker-compose build | ||
- name: Build and push official docker image | ||
env: | ||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} | ||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }} | ||
DOCKERHUB_ORG: "simonsobs" | ||
run: | | ||
export DOCKER_TAG=`git describe --tags --always` | ||
echo "${REGISTRY_PASSWORD}" | docker login -u "${REGISTRY_USER}" --password-stdin; | ||
# Tag all images for upload to the registry | ||
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:latest | ||
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker tag {}:latest ${DOCKERHUB_ORG}/{}:${DOCKER_TAG} | ||
# Upload to docker registry | ||
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker push ${DOCKERHUB_ORG}/{}:latest | ||
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} docker push ${DOCKERHUB_ORG}/{}:${DOCKER_TAG} | ||
docker-compose config | grep 'image: ' | awk -F ': ' '{ print $2 }' | xargs -I {} echo ${DOCKERHUB_ORG}/{}:${DOCKER_TAG} pushed | ||
wheel: | ||
name: build and deploy to PyPI | ||
needs: test | ||
runs-on: ubuntu-latest | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }} | ||
|
||
steps: | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: clone socs | ||
uses: actions/checkout@v2 | ||
|
||
- name: install build dependencies | ||
run: | | ||
python3 -m pip install --upgrade build twine | ||
- name: build wheel | ||
run: | | ||
python3 -m build | ||
- name: install wheel | ||
run: | | ||
python3 -m pip install dist/socs*.whl | ||
- name: install testing requirements | ||
run: | | ||
pip3 install -r requirements/testing.txt | ||
- name: Run unit tests | ||
working-directory: ./tests | ||
run: | | ||
python3 -m pytest -m 'not (integtest or spt3g)' | ||
- name: upload to PyPI | ||
run: | | ||
python3 -m twine upload dist/* |
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 |
---|---|---|
|
@@ -5,42 +5,91 @@ on: | |
branches: [ develop ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
test: | ||
name: pytest with coverage | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# Fetch all history for all tags and branches | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
access_token: ${{ github.token }} | ||
|
||
- name: Install system packages | ||
run: | | ||
sudo apt-get install -y socat | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
# Test (steps from pytest workflow) | ||
- name: Build docker images | ||
# (start steps from pytest workflow) | ||
# Install | ||
- name: Install so3g | ||
run: | | ||
docker-compose build | ||
pip3 install so3g | ||
# Fetch all history for all tags and branches | ||
- name: clone socs | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install socs | ||
run: | | ||
pip3 install -r requirements.txt | ||
pip3 install -e . | ||
# Unit Tests | ||
- name: Run unit tests | ||
working-directory: ./tests | ||
run: | | ||
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not integtest' | ||
- name: Test with pytest within a docker container | ||
- name: Build docker test images | ||
run: | | ||
docker run -v $PWD:/coverage --rm socs sh -c "COVERAGE_FILE=/coverage/.coverage.docker python3 -m pytest -p no:wampy --cov /app/socs/socs/ ./tests/" | ||
docker-compose build socs | ||
# Integration Tests | ||
- name: Build images for integration tests | ||
run: | | ||
docker-compose build ocs-lakeshore372-simulator | ||
- name: Run integration tests | ||
working-directory: ./tests | ||
run: | | ||
COVERAGE_FILE=.coverage.int python3 -m pytest --cov -m 'integtest' | ||
# Coverage | ||
- name: Report test coverage | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
mv ./tests/.coverage.* ./ | ||
pip install coveralls | ||
coverage combine | ||
coverage report | ||
coveralls --service=github | ||
# (end steps from pytest workflow) | ||
|
||
- name: Test documentation build | ||
run: | | ||
docker run --rm -e READTHEDOCS=True socs sh -c "make -C docs/ html" | ||
build: | ||
name: build and deploy dev images | ||
needs: test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Fetch all history for all tags and branches | ||
- name: clone socs | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Dockerize | ||
- name: Build docker images | ||
run: | | ||
docker-compose build | ||
- name: Build and push development docker image | ||
env: | ||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,33 +6,65 @@ on: | |
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
test: | ||
name: pytest with coverage | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Install system packages | ||
run: | | ||
sudo apt-get install -y socat | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Build docker images | ||
# Install | ||
- name: Install so3g | ||
run: | | ||
docker-compose build | ||
pip3 install so3g | ||
- name: Test with pytest wtihin a docker container | ||
- name: clone socs | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install socs | ||
run: | | ||
pip3 install -r requirements.txt | ||
pip3 install -e . | ||
# Unit Tests | ||
- name: Run unit tests | ||
working-directory: ./tests | ||
run: | | ||
docker run -v $PWD:/coverage --rm socs sh -c "COVERAGE_FILE=/coverage/.coverage.docker python3 -m pytest -p no:wampy --cov /app/socs/socs/ ./tests/" | ||
COVERAGE_FILE=.coverage.unit python3 -m pytest --cov -m 'not integtest' | ||
- name: Build docker test images | ||
run: | | ||
docker-compose build socs | ||
# Integration Tests | ||
- name: Build images for integration tests | ||
run: | | ||
docker-compose build ocs-lakeshore372-simulator | ||
- name: Run integration tests | ||
working-directory: ./tests | ||
run: | | ||
COVERAGE_FILE=.coverage.int python3 -m pytest --cov -m 'integtest' | ||
# Coverage | ||
- name: Report test coverage | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
mv ./tests/.coverage.* ./ | ||
pip install coveralls | ||
coverage combine | ||
coverage report | ||
coveralls --service=github | ||
- name: Test documentation build | ||
run: | | ||
docker run --rm -e READTHEDOCS=True socs sh -c "make -C docs/ html" |
Oops, something went wrong.