@@ -0,0 +1,35 @@ | |||||
name: deploy-cli | |||||
on: | |||||
push: | |||||
paths: | |||||
- 'cli/lesspass/version.py' | |||||
jobs: | |||||
test-cli: | |||||
runs-on: ubuntu-latest | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- uses: actions/setup-python@v1 | |||||
with: | |||||
python-version: '3.6' | |||||
- name: test cli | |||||
run: | | |||||
cd cli | |||||
./test | |||||
deploy-cli: | |||||
runs-on: ubuntu-latest | |||||
needs: test-cli | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- uses: actions/setup-python@v1 | |||||
with: | |||||
python-version: '3.6' | |||||
- name: deploy cli | |||||
run: | | |||||
cd cli | |||||
./deploy | |||||
env: | |||||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |||||
@@ -9,7 +9,7 @@ jobs: | |||||
deploy-containers: | deploy-containers: | ||||
runs-on: ubuntu-latest | runs-on: ubuntu-latest | ||||
steps: | steps: | ||||
- uses: actions/checkout@v1 | |||||
- uses: actions/checkout@v2 | |||||
- name: deploy containers | - name: deploy containers | ||||
run: | | run: | | ||||
./bin/deploy_containers | ./bin/deploy_containers | ||||
@@ -20,32 +20,17 @@ jobs: | |||||
deploy-node-modules: | deploy-node-modules: | ||||
runs-on: ubuntu-latest | runs-on: ubuntu-latest | ||||
steps: | steps: | ||||
- uses: actions/checkout@v1 | |||||
- uses: actions/checkout@v2 | |||||
- name: deploy node modules | - name: deploy node modules | ||||
run: | | run: | | ||||
./bin/deploy_node_modules | ./bin/deploy_node_modules | ||||
env: | env: | ||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||||
deploy-cli: | |||||
runs-on: ubuntu-latest | |||||
steps: | |||||
- uses: actions/checkout@v1 | |||||
- name: Set up Python | |||||
uses: actions/setup-python@v1 | |||||
with: | |||||
python-version: '3.x' | |||||
- name: deploy cli | |||||
run: | | |||||
./bin/deploy_cli | |||||
env: | |||||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |||||
deploy-web-extensions: | deploy-web-extensions: | ||||
runs-on: ubuntu-latest | runs-on: ubuntu-latest | ||||
steps: | steps: | ||||
- uses: actions/checkout@v1 | |||||
- uses: actions/checkout@v2 | |||||
- name: deploy web extensions | - name: deploy web extensions | ||||
run: | | run: | | ||||
./bin/deploy_web_extensions | ./bin/deploy_web_extensions | ||||
@@ -6,7 +6,7 @@ jobs: | |||||
test-packages: | test-packages: | ||||
runs-on: ubuntu-latest | runs-on: ubuntu-latest | ||||
steps: | steps: | ||||
- uses: actions/checkout@v1 | |||||
- uses: actions/checkout@v2 | |||||
- name: test packages | - name: test packages | ||||
run: | | run: | | ||||
yarn install | yarn install | ||||
@@ -15,7 +15,7 @@ jobs: | |||||
test-mobile: | test-mobile: | ||||
runs-on: ubuntu-latest | runs-on: ubuntu-latest | ||||
steps: | steps: | ||||
- uses: actions/checkout@v1 | |||||
- uses: actions/checkout@v2 | |||||
- name: test mobile | - name: test mobile | ||||
run: | | run: | | ||||
cd mobile | cd mobile | ||||
@@ -27,25 +27,21 @@ jobs: | |||||
strategy: | strategy: | ||||
max-parallel: 3 | max-parallel: 3 | ||||
matrix: | matrix: | ||||
python-version: [3.5, 3.6, 3.7] | |||||
python-version: [3.6, 3.7, 3.8] | |||||
steps: | steps: | ||||
- uses: actions/checkout@v1 | |||||
- uses: actions/checkout@v2 | |||||
- uses: actions/setup-python@v1 | - uses: actions/setup-python@v1 | ||||
with: | with: | ||||
python-version: ${{ matrix.python-version }} | python-version: ${{ matrix.python-version }} | ||||
- name: test cli | - name: test cli | ||||
run: | | run: | | ||||
cd cli | cd cli | ||||
python -m pip install --upgrade pip | |||||
python -m pip install -r requirements.txt | |||||
python -m pip install -r test-requirements.txt | |||||
export PYTHONPATH='.' | |||||
python -m unittest discover | |||||
./test | |||||
test-backend: | test-backend: | ||||
runs-on: ubuntu-latest | runs-on: ubuntu-latest | ||||
steps: | steps: | ||||
- uses: actions/checkout@v1 | |||||
- uses: actions/checkout@v2 | |||||
- uses: actions/setup-python@v1 | - uses: actions/setup-python@v1 | ||||
with: | with: | ||||
python-version: "3.6" | python-version: "3.6" | ||||
@@ -16,12 +16,10 @@ set -o pipefail | |||||
set -o nounset | set -o nounset | ||||
function push_cli_on_pypi { | function push_cli_on_pypi { | ||||
pushd cli | |||||
python -m pip install --upgrade pip | python -m pip install --upgrade pip | ||||
pip install setuptools wheel twine | pip install setuptools wheel twine | ||||
python setup.py sdist bdist_wheel | python setup.py sdist bdist_wheel | ||||
twine upload dist/* | twine upload dist/* | ||||
popd | |||||
} | } | ||||
push_cli_on_pypi | push_cli_on_pypi |
@@ -0,0 +1,11 @@ | |||||
#!/usr/bin/env bash | |||||
set -o errexit | |||||
set -o pipefail | |||||
set -o nounset | |||||
python -m pip install --upgrade pip | |||||
python -m pip install -r requirements.txt | |||||
python -m pip install -r test-requirements.txt | |||||
export PYTHONPATH='.' | |||||
python -m unittest discover |