π OpenHands: AI-Driven Development
Split Frontend and Python Unit tests (#3399)
mamoodi340fe0de18a4
diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.ymlindex dddd97a4bb..70df755595 100644--- a/.github/workflows/deploy-docs.yml+++ b/.github/workflows/deploy-docs.yml@@ -7,6 +7,8 @@ concurrency:group: ${{ github.workflow }}-${{ github.ref }}cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}+# * Always run on "main"+# * Run on PRs that target the "main" branch and have changes in the "docs" folderon:push:branches:diff --git a/.github/workflows/fe-unit-tests.yml b/.github/workflows/fe-unit-tests.ymlnew file mode 100644index 0000000000..eed8315c38--- /dev/null+++ b/.github/workflows/fe-unit-tests.yml@@ -0,0 +1,39 @@+# Workflow that runs frontend unit tests+name: Run Frontend Unit Tests++# * Always run on "main"+# * Run on PRs that have changes in the "frontend" folder or this workflow+on:+ push:+ branches:+ - main+ pull_request:+ paths:+ - 'frontend/**'+ - '.github/workflows/fe-unit-tests.yml'++jobs:+ # Run frontend unit tests+ fe-test:+ name: FE Unit Tests+ runs-on: ubuntu-latest+ strategy:+ matrix:+ node-version: [20]+ steps:+ - name: Checkout+ uses: actions/checkout@v4+ - name: Set up Node.js+ uses: actions/setup-node@v4+ with:+ node-version: ${{ matrix.node-version }}+ - name: Install dependencies+ working-directory: ./frontend+ run: npm ci+ - name: Run tests and collect coverage+ working-directory: ./frontend+ run: npm run test:coverage+ - name: Upload coverage to Codecov+ uses: codecov/codecov-action@v4+ env:+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/py-unit-tests.ymlsimilarity index 75%rename from .github/workflows/run-unit-tests.ymlrename to .github/workflows/py-unit-tests.ymlindex fb309c2749..acb005a057 100644--- a/.github/workflows/run-unit-tests.yml+++ b/.github/workflows/py-unit-tests.yml@@ -1,52 +1,19 @@-# Workflow that runs frontend and python unit tests-name: Run Unit Tests--# Only run one workflow of the same group at a time.-# There can be at most one running and one pending job in a concurrency group at any time.-concurrency:- group: ${{ github.workflow }}-${{ github.ref }}- cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}+# Workflow that runs python unit tests+name: Run Python Unit Tests+# The jobs in this workflow are required, so they must run at all times+# * Always run on "main"+# * Always run on PRson:push:branches:- main- paths-ignore:- - '**/*.md'- - 'frontend/**'- - 'docs/**'- - 'evaluation/**'pull_request:-jobs:- # Run frontend unit tests- fe-test:- runs-on: ubuntu-latest- strategy:- matrix:- node-version: [20]- steps:- - name: Checkout- uses: actions/checkout@v4- - name: Set up Node.js- uses: actions/setup-node@v4- with:- node-version: ${{ matrix.node-version }}- - name: Install dependencies- working-directory: ./frontend- run: npm ci- - name: Run tests and collect coverage- working-directory: ./frontend- run: npm run test:coverage- - name: Upload coverage to Codecov- uses: codecov/codecov-action@v4- env:- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}-# Run python unit tests on macOStest-on-macos:- name: Test on macOS+ name: Python Unit Tests on macOSruns-on: macos-12env:INSTALL_DOCKER: '1' # Set to '0' to skip Docker installation@@ -123,7 +90,7 @@ jobs:# Run python unit tests on Linuxtest-on-linux:- name: Test on Linux+ name: Python Unit Tests on Linuxruns-on: ubuntu-latestenv:INSTALL_DOCKER: '0' # Set to '0' to skip Docker installation