Sfoglia il codice sorgente

Merge branch 'bugfix/gh_action_on_pull_request' into 'master'

gh_action: fix error on new pull request

Closes IDFGH-1824

See merge request espressif/esp-idf!6116
Ivan Grokhotkov 6 anni fa
parent
commit
8df2b046f4

+ 12 - 10
.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 }}

+ 12 - 10
.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 }}

+ 0 - 16
.github/workflows/pull_request.yml

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

+ 32 - 0
.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

+ 0 - 7
.travis.yml

@@ -1,7 +0,0 @@
-language: python
-sudo: false
-python:
-  - "3.4"
-script:
-  - pip install flake8
-  - travis_wait 20 python -m flake8 --config=.flake8 .