From 90ae7d90acdf6fde97c51bab8878014c622b764b Mon Sep 17 00:00:00 2001 From: Fatimah Zulfiqar Date: Mon, 30 Sep 2024 14:58:42 +0200 Subject: [PATCH] ci: updated test.yaml file --- .github/workflows/tests.yml | 67 +++++-------------------------------- 1 file changed, 9 insertions(+), 58 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f494dfac..1154b165 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,9 +11,11 @@ name: CI on: push: - branches: master + branches: + - master pull_request: - branches: master + branches: + - master schedule: # * is a special character in YAML so you have to quote this string - cron: "0 3 * * 6" @@ -25,60 +27,9 @@ on: default: "Manual trigger" jobs: - Tests: - runs-on: ubuntu-20.04 - strategy: - matrix: - python-version: [3.8, 3.9] - requirements-level: [pypi] - db-service: [postgresql14, mysql8] - include: - - db-service: postgresql14 - DB: postgresql - POSTGRESQL_VERSION: POSTGRESQL_14_LATEST - SQLALCHEMY_DATABASE_URI: "postgresql+psycopg2://invenio:invenio@localhost:5432/invenio" - EXTRAS: "tests,postgresql" + Python: + uses: inveniosoftware/workflows/.github/workflows/tests-python.yml@master - - db-service: mysql8 - DB: mysql - MYSQL_VERSION: MYSQL_8_LATEST - SQLALCHEMY_DATABASE_URI: "mysql+pymysql://invenio:invenio@localhost:3306/invenio" - EXTRAS: "tests,mysql" - - env: - SQLALCHEMY_DATABASE_URI: ${{matrix.SQLALCHEMY_DATABASE_URI}} - POSTGRESQL_VERSION: ${{matrix.POSTGRESQL_VERSION}} - MYSQL_VERSION: ${{matrix.MYSQL_VERSION}} - DB: ${{ matrix.DB }} - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Generate dependencies - run: | - pip install wheel requirements-builder - requirements-builder -e ${{ matrix.EXTRAS }} --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt - - - name: Cache pip - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }} - - - name: Install dependencies - run: | - pip install -r .${{matrix.requirements-level}}-${{ matrix.python-version }}-requirements.txt - pip install .[${{ matrix.EXTRAS }}] - pip freeze - docker --version - docker-compose --version - - - name: Run tests - run: | - ./run-tests.sh + with: + extras: "tests" + search-service: '[""]'