From 5007c262d949561963ccbc79a150008bc6ddd3e1 Mon Sep 17 00:00:00 2001 From: Max Wittig Date: Wed, 18 Dec 2019 14:46:03 +0100 Subject: [PATCH 1/3] chore(ci): add GitHub actions --- .github/workflows/lint.yml | 18 ++++++++++++++++++ .github/workflows/main.yml | 22 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..61bd299bc --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,18 @@ +name: Lint + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Run commitlint + run: | + npm install -g @commitlint/cli @commitlint/config-conventional + 'echo "module.exports = {extends: [\"@commitlint/config-conventional\"]}" > commitlint.config.js' + npx commitlint --from=origin/master + - name: Run black + run: | + pip3 install --pre black==19.10b0 + black --check . diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..83dbb2833 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,22 @@ +name: CI + +on: + push: + branches: + - master + +strategy: + matrix: + environment: ["py36", "py37", "docs", "py_func_v4", "cli_func_v4"] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Test CLI func + run: | + pip3 install tox + tox -e ${ENVIRONMENT} + with: + environment: ${{ matrix.environment }} From bb657377ef39ed4ee924a20672b34e36016d51b2 Mon Sep 17 00:00:00 2001 From: Max Wittig Date: Thu, 19 Dec 2019 18:49:19 +0100 Subject: [PATCH 2/3] chore: tet again --- .github/workflows/lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 61bd299bc..01da7749e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,6 +9,9 @@ jobs: - uses: actions/checkout@v1 - name: Run commitlint run: | + mkdir "${HOME}/.npm-packages" + npm config set prefix "${HOME}/.npm-packages" + export PATH="$PATH:$NPM_PACKAGES/bin" npm install -g @commitlint/cli @commitlint/config-conventional 'echo "module.exports = {extends: [\"@commitlint/config-conventional\"]}" > commitlint.config.js' npx commitlint --from=origin/master From f5b43a01478bb06c80baf44363de1cdca64109f6 Mon Sep 17 00:00:00 2001 From: Max Wittig Date: Thu, 19 Dec 2019 19:04:41 +0100 Subject: [PATCH 3/3] test: update lint.yml --- .github/workflows/lint.yml | 4 +-- .github/workflows/main.yml | 73 +++++++++++++++++++++++++++++++------- .travis.yml | 69 ----------------------------------- 3 files changed, 63 insertions(+), 83 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 01da7749e..c2d2dd276 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,9 +13,9 @@ jobs: npm config set prefix "${HOME}/.npm-packages" export PATH="$PATH:$NPM_PACKAGES/bin" npm install -g @commitlint/cli @commitlint/config-conventional - 'echo "module.exports = {extends: [\"@commitlint/config-conventional\"]}" > commitlint.config.js' + echo "module.exports = {extends: [\"@commitlint/config-conventional\"]}" > commitlint.config.js npx commitlint --from=origin/master - name: Run black run: | pip3 install --pre black==19.10b0 - black --check . + python3 -m black --check . diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 83dbb2833..f9dea53c3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,22 +1,71 @@ name: CI -on: - push: - branches: - - master - -strategy: - matrix: - environment: ["py36", "py37", "docs", "py_func_v4", "cli_func_v4"] +on: [push] jobs: - build: + test-3-6: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-python@v1 + with: + python-version: "3.6" + - name: Test py36 + run: | + pip3 install tox + python3 -m tox -e py36 + test-3-7: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - name: Test CLI func + - uses: actions/setup-python@v1 + with: + python-version: "3.7" + - name: Test py37 run: | pip3 install tox - tox -e ${ENVIRONMENT} + python3 -m tox -e py37 + test-3-8: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-python@v1 with: - environment: ${{ matrix.environment }} + python-version: "3.8" + - name: Test py38 + run: | + pip3 install tox + python3 -m tox -e py38 + test-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-python@v1 + with: + python-version: "3.8" + - name: Test py38 + run: | + pip3 install tox + python3 -m tox -e docs + test-py_func_v4: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-python@v1 + with: + python-version: "3.8" + - name: Test py38 + run: | + pip3 install tox + python3 -m tox -e py_func_v4 + test-cli_func_v4: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-python@v1 + with: + python-version: "3.8" + - name: Test py38 + run: | + pip3 install tox + python3 -m tox -e cli_func_v4 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 83d2d3391..000000000 --- a/.travis.yml +++ /dev/null @@ -1,69 +0,0 @@ -sudo: required -services: - - docker -language: python - -git: - depth: false - -stages: - - lint - - test - -jobs: - include: - - stage: lint - name: commitlint - script: - - npm install -g @commitlint/cli @commitlint/config-conventional - - 'echo "module.exports = {extends: [\"@commitlint/config-conventional\"]}" > commitlint.config.js' - - npx commitlint --from=origin/master - - stage: lint - name: black_lint - dist: bionic - python: 3.8 - script: - - pip3 install -U --pre black - - black --check . - - stage: test - name: cli_func_v4 - dist: bionic - python: 3.8 - script: - - pip3 install tox - - tox -e cli_func_v4 - - stage: test - name: py_func_v4 - dist: bionic - python: 3.8 - script: - - pip3 install tox - - tox -e py_func_v4 - - stage: test - name: docs - dist: bionic - python: 3.8 - script: - - pip3 install tox - - tox -e docs - - stage: test - name: py36 - python: 3.6 - dist: bionic - script: - - pip3 install tox - - tox -e py36 - - stage: test - name: py37 - dist: bionic - python: 3.7 - script: - - pip3 install tox - - tox -e py37 - - stage: test - dist: bionic - name: py38 - python: 3.8 - script: - - pip3 install tox - - tox -e py38