diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml new file mode 100644 index 0000000..03fe5da --- /dev/null +++ b/.github/workflows/common.yml @@ -0,0 +1,34 @@ +name: "Common Steps" +inputs: + nosetests: + required: true +runs: + using: "composite" + steps: + + # Stylecheck + - name: Flake8 + run: flake8 client/funq server/funq_server + + # Server + - name: Install server + run: cd server && python3 setup.py develop + - name: Build server tests + run: cd server/tests && qmake QMAKE_CXXFLAGS="$CXXFLAGS" && make + - name: Test server + run: make -C server/tests/ check + + # Client + - name: Install client + run: cd client && python3 setup.py develop + # Note: Nosetest doesn't work anymore with recent Python versions! + - name: Test client + run: cd client && python3 setup.py test + if: ${{ nosetests }} + + # Functional tests + - name: Build test app + run: cd tests-functionnal/funq-test-app && qmake QMAKE_CXXFLAGS="$CXXFLAGS" && make + - name: Test functional + run: cd tests-functionnal && nosetests + if: ${{ nosetests }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 233a6c7..8f7930b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,30 +25,6 @@ jobs: export PATH="/opt/homebrew/opt/qt@5/bin:$PATH" pip3 install setuptools flake8 export PATH="$PATH:`python3 -m site --user-base`/bin" - - # Stylecheck - - name: Flake8 - run: flake8 client/funq server/funq_server - - # Server - - name: Install server - run: cd server && python3 setup.py develop - - name: Build server tests - run: cd server/tests && qmake QMAKE_CXXFLAGS="$CXXFLAGS" && make - - name: Test server - run: make -C server/tests/ check - - # Client - - name: Install client - run: cd client && python3 setup.py develop - # Note: Nosetest doesn't work anymore with recent Python versions! - - name: Test client - run: cd client && python3 setup.py test - if: ${{ matrix.nosetests }} - - # Functional tests - - name: Build test app - run: cd tests-functionnal/funq-test-app && qmake QMAKE_CXXFLAGS="$CXXFLAGS" && make - - name: Test functional - run: cd tests-functionnal && nosetests - if: ${{ matrix.nosetests }} + - uses: ./.github/workflows/common + with: + nosetests: ${{ matrix.nosetests }}