diff options
author | Nejc Habjan <hab.nejc@gmail.com> | 2021-01-26 23:30:52 +0100 |
---|---|---|
committer | Nejc Habjan <hab.nejc@gmail.com> | 2021-01-26 23:30:52 +0100 |
commit | 8bb73a3440b79df93c43214c31332ad47ab286d8 (patch) | |
tree | 70af9bc8db18ae6653bcb3299528168e4ed3a5c3 | |
parent | 55cbd1cbc28b93673f73818639614c61c18f07d1 (diff) | |
download | gitlab-8bb73a3440b79df93c43214c31332ad47ab286d8.tar.gz |
chore(ci): replace travis with Actions
-rw-r--r-- | .github/workflows/lint.yml | 20 | ||||
-rw-r--r-- | .github/workflows/test.yml | 45 | ||||
-rw-r--r-- | .travis.yml | 108 |
3 files changed, 65 insertions, 108 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..10d7ae5 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,20 @@ +name: Lint + +on: [push, pull_request] + +jobs: + black: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - uses: psf/black@stable + with: + black_args: ". --check" + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ef35986 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,45 @@ +name: Test + +on: [push, pull_request] + +jobs: + unit: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - python-version: 3.6 + toxenv: py36 + - python-version: 3.7 + toxenv: py37 + - python-version: 3.8 + toxenv: py38 + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: pip install tox + - name: Run tests + env: + TOXENV: ${{ matrix.toxenv }} + run: tox + functional: + runs-on: ubuntu-latest + strategy: + matrix: + toxenv: [py_func_v4, py_func_cli] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: pip install tox + - name: Run tests + env: + TOXENV: ${{ matrix.toxenv }} + run: tox diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 09359b5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,108 +0,0 @@ -sudo: required -services: - - docker -language: python - -git: - depth: false - -stages: - - lint - - test - -jobs: - include: - - stage: lint - name: commitlint - python: 3.8 - script: - - pip3 install pre-commit - - pre-commit run --hook-stage manual commitlint-travis - cache: - directories: - - $HOME/.cache/pre-commit - - stage: lint - name: black_lint - dist: bionic - python: 3.8 - script: - - pip3 install -U --pre black==20.8b1 - - 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: cli_func_nightly - dist: bionic - python: 3.8 - env: GITLAB_TAG=nightly - script: - - pip3 install tox - - tox -e cli_func_v4 - - stage: test - name: py_func_nightly - dist: bionic - python: 3.8 - env: GITLAB_TAG=nightly - 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 - - stage: test - dist: bionic - name: twine-check - python: 3.8 - script: - - pip3 install tox wheel - - python3 setup.py sdist bdist_wheel - - tox -e twine-check - - stage: test - dist: bionic - name: coverage - python: 3.8 - install: - - pip3 install tox codecov - script: - - tox -e cover - after_success: - - codecov - allow_failures: - - env: GITLAB_TAG=nightly |