From 9f23859ed124cfbdfcc9a58bdfcf79500f307512 Mon Sep 17 00:00:00 2001 From: Sam Arbid Date: Wed, 30 Oct 2024 11:40:00 +0100 Subject: [PATCH] CI: switch to centralized workflows --- .github/workflows/tests.yml | 74 +++++-------------------------------- 1 file changed, 10 insertions(+), 64 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 435ee5d5c..e45cbe474 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,8 @@ name: CI on: push: - branches: master + branches: + - master pull_request: branches: - master @@ -26,66 +27,11 @@ on: default: "Manual trigger" jobs: - Tests: - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - python-version: [3.9, 3.12] - db-service: [postgresql14] - search-service: [opensearch2] - node-version: [18.x, 20.x] - include: - - db-service: postgresql14 - DB_EXTRAS: "postgresql" - - - search-service: opensearch2 - SEARCH_EXTRAS: "opensearch2" - - env: - DB: ${{ matrix.db-service }} - SEARCH: ${{ matrix.search-service }} - EXTRAS: tests,${{ matrix.SEARCH_EXTRAS }} - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: pip - cache-dependency-path: setup.cfg - - - name: Install dependencies - run: | - pip install ".[$EXTRAS]" - pip freeze - docker version - - - name: Run backend tests - run: ./run-tests.sh - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - - name: Run eslint test - run: ./run-js-linter.sh -i - - - name: Run translations test - run: ./run-i18n-tests.sh - - - name: Install deps for frontend tests - working-directory: ./invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records - run: npm install - - - name: Install deps for frontend tests - translations - working-directory: ./invenio_rdm_records/assets/semantic-ui/translations/invenio_rdm_records - run: npm install - - - name: Run frontend tests - working-directory: ./invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records - run: npm test + Python: + uses: inveniosoftware/workflows/.github/workflows/tests-python.yml@master + + JS: + uses: inveniosoftware/workflows/.github/workflows/tests-js.yml@master + with: + js-working-directory: ./invenio_rdm_records/assets/semantic-ui/js/invenio_rdm_records + translations-working-directory: ./invenio_rdm_records/assets/semantic-ui/translations/invenio_rdm_records \ No newline at end of file