From bd250fc8708b1562f6bf5ed273e3dce156b433be Mon Sep 17 00:00:00 2001 From: Marc Date: Wed, 16 Dec 2020 16:45:25 +0100 Subject: [PATCH 1/4] add github actions support --- .github/.workflows/main.yml | 56 +++++++++++++++++++++++++++++++++++++ .travis.yml | 46 ------------------------------ 2 files changed, 56 insertions(+), 46 deletions(-) create mode 100644 .github/.workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/.workflows/main.yml b/.github/.workflows/main.yml new file mode 100644 index 000000000..c8555ddbd --- /dev/null +++ b/.github/.workflows/main.yml @@ -0,0 +1,56 @@ +name: Build + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + name: Build + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - python-version: 3.8 + env: + TOXENV: flake8 + - python-version: 3.5 + env: + TOXENV: py + - python-version: 3.6 + env: + TOXENV: py + - python-version: 3.7 + env: + TOXENV: py + - python-version: 3.8 + env: + TOXENV: py + - python-version: 3.8 + env: + TOXENV: latest + - python-version: 3.9 + env: + TOXENV: py + - python-version: 3.9 + env: + TOXENV: latest + + 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 language-pack-fr + run: apt-get install language-pack-fr + - name: Install python dependencies + run: pip install tox + - name: tox + run: tox -e py + - uses: codecov/codecov-action@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 57f71fcb4..000000000 --- a/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ -# Config file for automatic testing at travis-ci.org - -language: python - -matrix: - include: - - python: 3.8 - env: TOXENV=flake8 - - python: 3.5 - env: TOXENV=py - - python: 3.6 - env: TOXENV=py - - python: 3.7 - env: TOXENV=py - - python: 3.8 - env: TOXENV=py PYPI_RELEASE_JOB=true - - python: 3.8 - env: TOXENV=latest - - python: 3.9 - env: TOXENV=latest - -install: pip install -U wheel tox codecov - -cache: pip - -# command to run tests, e.g. python setup.py test -script: tox - -addons: - apt: - packages: - - language-pack-fr - -after_success: - - codecov - -deploy: - provider: pypi - distributions: sdist bdist_wheel - user: scrapinghub - password: - secure: "Vs2Z69YTFzQWVkos7IvP4xk0RAQ35dzVXP+EAmzMkqi9qToTa7jdeF8deY18r3l8093jaJ/ct6NzjNiZ6ryWl1yKBwYoW+jaXjKGVXMFSQdqXiDreu516rqrOiRfZVHy+G9TabjhVrIW2npkxuOP7d0HONOZnNtCn6QrxQwEBzw=" - on: - tags: true - repo: scrapinghub/dateparser - condition: "$PYPI_RELEASE_JOB == true" From 5f820bee0021e9a9a7a37e6529f62d79388fb659 Mon Sep 17 00:00:00 2001 From: Marc Date: Mon, 8 Feb 2021 21:18:42 +0100 Subject: [PATCH 2/4] reformat github actions yaml --- .github/.workflows/main.yml | 75 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 39 deletions(-) diff --git a/.github/.workflows/main.yml b/.github/.workflows/main.yml index c8555ddbd..1ccfd3a4a 100644 --- a/.github/.workflows/main.yml +++ b/.github/.workflows/main.yml @@ -1,5 +1,4 @@ name: Build - on: push: branches: @@ -7,7 +6,6 @@ on: pull_request: branches: - master - jobs: build: name: Build @@ -16,41 +14,40 @@ jobs: fail-fast: false matrix: include: - - python-version: 3.8 - env: - TOXENV: flake8 - - python-version: 3.5 - env: - TOXENV: py - - python-version: 3.6 - env: - TOXENV: py - - python-version: 3.7 - env: - TOXENV: py - - python-version: 3.8 - env: - TOXENV: py - - python-version: 3.8 - env: - TOXENV: latest - - python-version: 3.9 - env: - TOXENV: py - - python-version: 3.9 - env: - TOXENV: latest - + - python-version: 3.8 + env: + TOXENV: flake8 + - python-version: 3.5 + env: + TOXENV: py + - python-version: 3.6 + env: + TOXENV: py + - python-version: 3.7 + env: + TOXENV: py + - python-version: 3.8 + env: + TOXENV: py + - python-version: 3.8 + env: + TOXENV: latest + - python-version: 3.9 + env: + TOXENV: py + - python-version: 3.9 + env: + TOXENV: latest 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 language-pack-fr - run: apt-get install language-pack-fr - - name: Install python dependencies - run: pip install tox - - name: tox - run: tox -e py - - uses: codecov/codecov-action@v1 + - uses: actions/checkout@v2 + - name: 'Set up Python ${{ matrix.python-version }}' + uses: actions/setup-python@v2 + with: + python-version: '${{ matrix.python-version }}' + - name: Install language-pack-fr + run: apt-get install language-pack-fr + - name: Install python dependencies + run: pip install tox + - name: tox + run: tox -e py + - uses: codecov/codecov-action@v1 From 502a46ff82d0b449ba520ce38b4cbeea6f147402 Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 9 Feb 2021 08:47:46 +0100 Subject: [PATCH 3/4] fix directory --- .github/{.workflows => workflows}/main.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{.workflows => workflows}/main.yml (100%) diff --git a/.github/.workflows/main.yml b/.github/workflows/main.yml similarity index 100% rename from .github/.workflows/main.yml rename to .github/workflows/main.yml From 0ff6c2bbaac7028b2516f800a106951624d3843b Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 9 Feb 2021 08:52:15 +0100 Subject: [PATCH 4/4] add sudo --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1ccfd3a4a..408126f0c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,7 +45,7 @@ jobs: with: python-version: '${{ matrix.python-version }}' - name: Install language-pack-fr - run: apt-get install language-pack-fr + run: sudo apt-get install language-pack-fr - name: Install python dependencies run: pip install tox - name: tox