@@ -0,0 +1,52 @@ | |||||
name: deploy | |||||
on: | |||||
push: | |||||
branches: | |||||
- refs/tags/* | |||||
jobs: | |||||
deploy-containers: | |||||
runs-on: ubuntu-latest | |||||
needs: test-containers | |||||
steps: | |||||
- uses: actions/checkout@v1 | |||||
- name: deploy containers | |||||
run: | | |||||
cd containers | |||||
./deploy | |||||
env: | |||||
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} | |||||
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | |||||
deploy-packages: | |||||
runs-on: ubuntu-latest | |||||
needs: test-packages | |||||
steps: | |||||
- uses: actions/checkout@v1 | |||||
- name: deploy packages | |||||
run: | | |||||
cd packages | |||||
./deploy | |||||
env: | |||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |||||
deploy-cli: | |||||
runs-on: ubuntu-latest | |||||
needs: test-cli | |||||
steps: | |||||
- uses: actions/checkout@v1 | |||||
- name: Set up Python | |||||
uses: actions/setup-python@v1 | |||||
with: | |||||
python-version: '3.x' | |||||
- name: deploy cli | |||||
env: | |||||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |||||
run: | | |||||
cd cli | |||||
python -m pip install --upgrade pip | |||||
pip install setuptools wheel twine | |||||
python setup.py sdist bdist_wheel | |||||
twine upload dist/* |
@@ -1,28 +1,28 @@ | |||||
name: ci | |||||
name: test | |||||
on: [push, pull_request] | on: [push, pull_request] | ||||
jobs: | jobs: | ||||
test-javascript-packages: | |||||
test-packages: | |||||
runs-on: ubuntu-latest | runs-on: ubuntu-latest | ||||
steps: | steps: | ||||
- uses: actions/checkout@v1 | - uses: actions/checkout@v1 | ||||
- name: test javascript packages | |||||
- name: test packages | |||||
run: | | run: | | ||||
yarn install | yarn install | ||||
yarn test | yarn test | ||||
test-mobile-app: | |||||
test-mobile: | |||||
runs-on: ubuntu-latest | runs-on: ubuntu-latest | ||||
steps: | steps: | ||||
- uses: actions/checkout@v1 | - uses: actions/checkout@v1 | ||||
- name: test mobile app | |||||
- name: test mobile | |||||
run: | | run: | | ||||
cd mobile | cd mobile | ||||
yarn install | yarn install | ||||
yarn test | yarn test | ||||
test-python-cli: | |||||
test-cli: | |||||
runs-on: ubuntu-latest | runs-on: ubuntu-latest | ||||
strategy: | strategy: | ||||
max-parallel: 3 | max-parallel: 3 | ||||
@@ -33,7 +33,7 @@ jobs: | |||||
- uses: actions/setup-python@v1 | - uses: actions/setup-python@v1 | ||||
with: | with: | ||||
python-version: ${{ matrix.python-version }} | python-version: ${{ matrix.python-version }} | ||||
- name: test python cli | |||||
- name: test cli | |||||
run: | | run: | | ||||
cd cli | cd cli | ||||
python -m pip install --upgrade pip | python -m pip install --upgrade pip | ||||
@@ -42,16 +42,25 @@ jobs: | |||||
export PYTHONPATH='.' | export PYTHONPATH='.' | ||||
python -m unittest discover | python -m unittest discover | ||||
test-python-backend: | |||||
test-backend: | |||||
runs-on: ubuntu-latest | runs-on: ubuntu-latest | ||||
steps: | steps: | ||||
- uses: actions/checkout@v1 | - uses: actions/checkout@v1 | ||||
- uses: actions/setup-python@v1 | - uses: actions/setup-python@v1 | ||||
with: | with: | ||||
python-version: "3.6" | python-version: "3.6" | ||||
- name: test python backend | |||||
- name: test backend | |||||
run: | | run: | | ||||
cd containers/backend | cd containers/backend | ||||
python -m pip install --upgrade pip | python -m pip install --upgrade pip | ||||
python -m pip install -r requirements.txt | python -m pip install -r requirements.txt | ||||
python manage.py test | python manage.py test | ||||
test-containers: | |||||
runs-on: ubuntu-latest | |||||
steps: | |||||
- uses: actions/checkout@v1 | |||||
- name: test containers | |||||
run: | | |||||
cd containers | |||||
./test |
@@ -1,4 +1,4 @@ | |||||
[![Actions Status](https://github.com/lesspass/lesspass/workflows/ci/badge.svg)](https://github.com/lesspass/lesspass/actions) [![Backers on Open Collective](https://opencollective.com/lesspass/backers/badge.svg)](CONTRIBUTING.md#backers) [![Sponsors on Open Collective](https://opencollective.com/lesspass/sponsors/badge.svg)](CONTRIBUTING.md#sponsors) | |||||
[![Actions Status](https://github.com/lesspass/lesspass/workflows/test/badge.svg)](https://github.com/lesspass/lesspass/actions) [![Backers on Open Collective](https://opencollective.com/lesspass/backers/badge.svg)](CONTRIBUTING.md#backers) [![Sponsors on Open Collective](https://opencollective.com/lesspass/sponsors/badge.svg)](CONTRIBUTING.md#sponsors) | |||||
# LessPass | # LessPass | ||||
@@ -56,10 +56,10 @@ function replace_versions_in_files { | |||||
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-pure/package.json | sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-pure/package.json | ||||
sed -i "s/\"lesspass\": \"${1}\"/\"lesspass\": \"${2}\"/g" packages/lesspass-pure/package.json | sed -i "s/\"lesspass\": \"${1}\"/\"lesspass\": \"${2}\"/g" packages/lesspass-pure/package.json | ||||
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-render-password/package.json | sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-render-password/package.json | ||||
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-site/package.json | |||||
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-web-extension/package.json | sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-web-extension/package.json | ||||
sed -i "s/\"lesspass-pure\": \"${1}\"/\"lesspass-pure\": \"${2}\"/g" packages/lesspass-web-extension/package.json | sed -i "s/\"lesspass-pure\": \"${1}\"/\"lesspass-pure\": \"${2}\"/g" packages/lesspass-web-extension/package.json | ||||
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-web-extension/extension/manifest.json | sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-web-extension/extension/manifest.json | ||||
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" containers/frontend/package.json | |||||
sed -i "s/VERSION=\"${1}\"/VERSION=\"${2}\"/g" containers/deploy | sed -i "s/VERSION=\"${1}\"/VERSION=\"${2}\"/g" containers/deploy | ||||
} | } | ||||
@@ -1,16 +1,14 @@ | |||||
#!/usr/bin/env bash | #!/usr/bin/env bash | ||||
set -e | set -e | ||||
VERSION="9.0.0" | |||||
podman login --username "${QUAI_USERNAME}" --password "${QUAI_PASSWORD}" quai.io | |||||
podman build --tag lesspass/webserver:${VERSION} --tag lesspass/webserver:latest ./webserver | |||||
podman build --tag lesspass/frontend:${VERSION} --tag lesspass/frontend:latest ./frontend | |||||
podman build --tag lesspass/backend:${VERSION} --tag lesspass/backend:latest ./backend | |||||
podman images | |||||
podman --version | |||||
podman push --creds "${QUAI_USERNAME}:${QUAI_PASSWORD}" lesspass/webserver:${VERSION} docker://quai.io/lesspass/webserver | |||||
podman push --creds "${QUAI_USERNAME}:${QUAI_PASSWORD}" lesspass/webserver:latest docker://quai.io/lesspass/webserver | |||||
podman push --creds "${QUAI_USERNAME}:${QUAI_PASSWORD}" lesspass/frontend:${VERSION} docker://quai.io/lesspass/frontend | |||||
podman push --creds "${QUAI_USERNAME}:${QUAI_PASSWORD}" lesspass/frontend:latest docker://quai.io/lesspass/frontend | |||||
podman push --creds "${QUAI_USERNAME}:${QUAI_PASSWORD}" lesspass/backend:${VERSION} docker://quai.io/lesspass/backend | |||||
podman push --creds "${QUAI_USERNAME}:${QUAI_PASSWORD}" lesspass/backend:latest docker://quai.io/lesspass/backend | |||||
build_and_push () { | |||||
PROJECT=$1 | |||||
docker build --tag lesspass/${PROJECT} ./${PROJECT} | |||||
docker tag lesspass/${PROJECT} quay.io/lesspass/${PROJECT} | |||||
docker push quay.io/lesspass/${PROJECT} | |||||
} | |||||
docker login --username="${QUAY_USERNAME}" --password="${QUAY_PASSWORD}" quay.io | |||||
build_and_push webserver | |||||
build_and_push backend | |||||
build_and_push frontend |
@@ -0,0 +1 @@ | |||||
../packages/lesspass-site/ |
@@ -1,11 +1,10 @@ | |||||
#!/usr/bin/env bash | #!/usr/bin/env bash | ||||
set -e | set -e | ||||
# containers | |||||
export COMPOSE_PROJECT_NAME=lesspass | export COMPOSE_PROJECT_NAME=lesspass | ||||
docker-compose build | docker-compose build | ||||
docker-compose down -v | docker-compose down -v | ||||
docker-compose up -d | docker-compose up -d | ||||
docker exec -it lesspass_backend_1 sh -c 'python wait_db.py' | |||||
docker exec -it lesspass_backend_1 sh -c 'python manage.py test' | |||||
docker exec lesspass_backend_1 sh -c 'python wait_db.py' | |||||
docker exec lesspass_backend_1 sh -c 'python manage.py test' | |||||
docker-compose down -v | docker-compose down -v |
@@ -1,4 +0,0 @@ | |||||
[build] | |||||
base = "packages/lesspass-site/" | |||||
publish = "packages/lesspass-site/build/" | |||||
command = "yarn build" |
@@ -0,0 +1,15 @@ | |||||
#!/usr/bin/env bash | |||||
set -e | |||||
install_and_publish () { | |||||
PROJECT=$1 | |||||
pushd ${PROJECT} | |||||
yarn publish | |||||
popd | |||||
} | |||||
projects="lesspass lesspass-crypto lesspass-entropy lesspass-fingerprint lesspass-pure lesspass-render-password" | |||||
for project in ${projects} | |||||
do | |||||
install_and_publish ${project} | |||||
done |
@@ -1,5 +1,5 @@ | |||||
{ | { | ||||
"name": "lesspass-web-site", | |||||
"name": "lesspass-site", | |||||
"version": "9.0.0", | "version": "9.0.0", | ||||
"description": "LessPass web site", | "description": "LessPass web site", | ||||
"license": "GPL-3.0", | "license": "GPL-3.0", | ||||