Quellcode durchsuchen

Change github actions workflow strategy

pull/531/head
Guillaume Vincent vor 4 Jahren
Ursprung
Commit
3a12d21949
5 geänderte Dateien mit 55 neuen und 30 gelöschten Zeilen
  1. +35
    -0
      .github/workflows/deploy-cli.yml
  2. +3
    -18
      .github/workflows/deploy.yml
  3. +6
    -10
      .github/workflows/test.yml
  4. +0
    -2
      cli/deploy
  5. +11
    -0
      cli/test

+ 35
- 0
.github/workflows/deploy-cli.yml Datei anzeigen

@@ -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 }}


+ 3
- 18
.github/workflows/deploy.yml Datei anzeigen

@@ -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


+ 6
- 10
.github/workflows/test.yml Datei anzeigen

@@ -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"


bin/deploy_cli → cli/deploy Datei anzeigen

@@ -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

+ 11
- 0
cli/test Datei anzeigen

@@ -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

Laden…
Abbrechen
Speichern