From 58577db086bd3a71553f6cf785742de9f1d0d40d Mon Sep 17 00:00:00 2001 From: suda-morris <362953310@qq.com> Date: Wed, 4 Sep 2019 15:36:50 +0800 Subject: [PATCH] gh_action: fix error on new pull request 1. Disable the broken pull request sync temporarily 2. move python lint from travis to github action --- .github/workflows/issue_comment.yml | 22 +++++++++++--------- .github/workflows/issues.yml | 22 +++++++++++--------- .github/workflows/pull_request.yml | 16 --------------- .github/workflows/python_lint.yml | 32 +++++++++++++++++++++++++++++ .travis.yml | 7 ------- 5 files changed, 56 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/pull_request.yml create mode 100644 .github/workflows/python_lint.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml index 16069f1f1..1e268bed9 100644 --- a/.github/workflows/issue_comment.yml +++ b/.github/workflows/issue_comment.yml @@ -1,16 +1,18 @@ +name: Sync issue comments to JIRA + on: issue_comment -name: Sync issue and PR comments to JIRA + jobs: syncToJIRA: name: Sync to JIRA runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: Sync to JIRA - uses: espressif/github-actions/sync_issues_to_jira@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - JIRA_PASS: ${{ secrets.JIRA_PASS }} - JIRA_PROJECT: IDFGH - JIRA_URL: ${{ secrets.JIRA_URL }} - JIRA_USER: ${{ secrets.JIRA_USER }} + - uses: actions/checkout@master + - name: Sync issue comments to JIRA + uses: espressif/github-actions/sync_issues_to_jira@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JIRA_PASS: ${{ secrets.JIRA_PASS }} + JIRA_PROJECT: IDFGH + JIRA_URL: ${{ secrets.JIRA_URL }} + JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml index 3ead59688..b4cc06110 100644 --- a/.github/workflows/issues.yml +++ b/.github/workflows/issues.yml @@ -1,16 +1,18 @@ -on: issues name: Sync issues to JIRA + +on: issues + jobs: syncToJIRA: name: Sync to JIRA runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: Sync to JIRA - uses: espressif/github-actions/sync_issues_to_jira@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - JIRA_PASS: ${{ secrets.JIRA_PASS }} - JIRA_PROJECT: IDFGH - JIRA_URL: ${{ secrets.JIRA_URL }} - JIRA_USER: ${{ secrets.JIRA_USER }} + - uses: actions/checkout@master + - name: Sync issues to JIRA project + uses: espressif/github-actions/sync_issues_to_jira@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JIRA_PASS: ${{ secrets.JIRA_PASS }} + JIRA_PROJECT: IDFGH + JIRA_URL: ${{ secrets.JIRA_URL }} + JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml deleted file mode 100644 index 324639e08..000000000 --- a/.github/workflows/pull_request.yml +++ /dev/null @@ -1,16 +0,0 @@ -on: pull_request -name: Sync PRs to JIRA -jobs: - syncToJIRA: - name: Sync to JIRA - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Sync to JIRA - uses: espressif/github-actions/sync_issues_to_jira@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - JIRA_PASS: ${{ secrets.JIRA_PASS }} - JIRA_PROJECT: IDFGH - JIRA_URL: ${{ secrets.JIRA_URL }} - JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/python_lint.yml b/.github/workflows/python_lint.yml new file mode 100644 index 000000000..897ef55a9 --- /dev/null +++ b/.github/workflows/python_lint.yml @@ -0,0 +1,32 @@ +name: Python CI + +# This workflow will be triggered when a PR modifies some python relevant files +on: + pull_request: + paths: + - "*.py" + - "requirements.txt" + +jobs: + python_lint: + name: python lint + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [2.7, 3.5, 3.6, 3.7] + + steps: + - name: Checkout + uses: actions/checkout@master + - name: Set up Python environment + uses: actions/setup-python@master + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install --upgrade pip + pip install -r requirements.txt + - name: Lint with flake8 + run: | + pip install flake8 + flake8 . --config=.flake8 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 74902f9f3..000000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: python -sudo: false -python: - - "3.4" -script: - - pip install flake8 - - travis_wait 20 python -m flake8 --config=.flake8 .