diff --git a/.github/workflows/deploy-cli.yml b/.github/workflows/deploy-cli.yml new file mode 100644 index 0000000..1fbee8b --- /dev/null +++ b/.github/workflows/deploy-cli.yml @@ -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 }} + diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fe651e4..067ad29 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,7 +9,7 @@ jobs: deploy-containers: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: deploy containers run: | ./bin/deploy_containers @@ -20,32 +20,17 @@ jobs: deploy-node-modules: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: deploy node modules run: | ./bin/deploy_node_modules env: 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: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: deploy web extensions run: | ./bin/deploy_web_extensions diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bcf06d7..025fb86 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ jobs: test-packages: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: test packages run: | yarn install @@ -15,7 +15,7 @@ jobs: test-mobile: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: test mobile run: | cd mobile @@ -27,25 +27,21 @@ jobs: strategy: max-parallel: 3 matrix: - python-version: [3.5, 3.6, 3.7] + python-version: [3.6, 3.7, 3.8] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: test cli run: | 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: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-python@v1 with: python-version: "3.6" diff --git a/bin/deploy_cli b/cli/deploy similarity index 92% rename from bin/deploy_cli rename to cli/deploy index 5acc892..11a430c 100755 --- a/bin/deploy_cli +++ b/cli/deploy @@ -16,12 +16,10 @@ set -o pipefail set -o nounset function push_cli_on_pypi { - pushd cli python -m pip install --upgrade pip pip install setuptools wheel twine python setup.py sdist bdist_wheel twine upload dist/* - popd } push_cli_on_pypi \ No newline at end of file diff --git a/cli/test b/cli/test new file mode 100755 index 0000000..e3f291d --- /dev/null +++ b/cli/test @@ -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 \ No newline at end of file