From 315a2797d08a639372dcc6066fbb373f0798801f Mon Sep 17 00:00:00 2001 From: Tyler Gu Date: Wed, 13 Dec 2023 16:59:50 -0600 Subject: [PATCH] Merge duplicated workflow Signed-off-by: Tyler Gu --- .github/workflows/python-syntax-checker.yml | 38 --------------------- .github/workflows/unittest.yaml | 21 +++++++++--- 2 files changed, 16 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/python-syntax-checker.yml diff --git a/.github/workflows/python-syntax-checker.yml b/.github/workflows/python-syntax-checker.yml deleted file mode 100644 index 158a98b300..0000000000 --- a/.github/workflows/python-syntax-checker.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: python-syntax-checker - -on: - push: - branches: [ main ] - pull_request_target: - branches: [ main ] - -jobs: - python-syntax-check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - with: - python-version: "3.8" - - name: Install Packages - run: pip install codespell flake8 - - name: Check Spelling - run: codespell --skip="./data"|| true - - name: Check Syntax Error - run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - - uses: actions/setup-go@v4 - with: - go-version: '1.20.5' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - make - - name: Run unittest - run: | - pytest -m "not local and not singleBugReproduction" --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=acto | tee pytest-coverage.txt - - name: Pytest coverage comment - uses: MishaKav/pytest-coverage-comment@main - with: - pytest-coverage-path: ./pytest-coverage.txt - junitxml-path: ./pytest.xml diff --git a/.github/workflows/unittest.yaml b/.github/workflows/unittest.yaml index 2311fdc8c7..155b01170e 100644 --- a/.github/workflows/unittest.yaml +++ b/.github/workflows/unittest.yaml @@ -5,13 +5,18 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + with: + python-version: "3.8" + - name: Install Packages + run: pip install codespell flake8 + - name: Check Spelling + run: codespell --skip="./data"|| true + - name: Check Syntax Error + run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - uses: actions/setup-go@v4 with: go-version: '1.20.5' - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.8' - name: Install dependencies run: | python -m pip install --upgrade pip @@ -19,4 +24,10 @@ jobs: make - name: Run unittest run: | - pytest -m "not local and not singleBugReproduction" \ No newline at end of file + pytest -m "not local and not singleBugReproduction" --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=acto | tee pytest-coverage.txt + - name: Pytest coverage comment + if: ${{ github.event == 'pull_request' }} + uses: MishaKav/pytest-coverage-comment@main + with: + pytest-coverage-path: ./pytest-coverage.txt + junitxml-path: ./pytest.xml \ No newline at end of file