From b8bd1133969caaecba4840b633a0754a88553313 Mon Sep 17 00:00:00 2001 From: Denys Gonchar Date: Thu, 23 Mar 2023 02:35:59 +0100 Subject: [PATCH] adding big-tests GH action --- .github/actions/big-tests/action.yml | 54 ++++++++++++++++++++++++++++ .github/workflows/ci.yml | 39 +++++--------------- 2 files changed, 62 insertions(+), 31 deletions(-) create mode 100644 .github/actions/big-tests/action.yml diff --git a/.github/actions/big-tests/action.yml b/.github/actions/big-tests/action.yml new file mode 100644 index 00000000000..877a37ec06b --- /dev/null +++ b/.github/actions/big-tests/action.yml @@ -0,0 +1,54 @@ + +name: big_tests execution +inputs: + preset: + description: "test preset" + required: true + type: string + otp: + description: "OTP version" + required: true + type: string + tls-dist: + description: "OTP distribution over TLS" + required: false + default: false + type: boolean + test-spec: + description: "test spec" + required: false + default: "default.spec" + type: string +runs: + using: "composite" + steps: + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{inputs.otp}} + - uses: actions/cache@v3 + with: + path: ~/.cache/rebar3 + key: rebar3-${{ hashFiles('rebar.lock') }} + - name: create certificates + run: make certs + - name: set required env variables for preset + run: tools/gh-actions-configure-preset.sh "$PRESET" + - if: ${{ inputs.preset == 'odbc_mssql_mnesia' }} + run: sudo apt-get install -y tdsodbc + - name: build releases + run: tools/build-releases.sh + - name: build big tests + run: tools/build-tests.sh + - name: start backends + run: tools/setup-db.sh + - name: run test + run: tools/test.sh -p $PRESET -s false -e false + - name: prepare coverage report + run: ./rebar3 codecov analyze --lcov --json false + - name: report coverage + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + flag-name: "${{inputs.preset}} (${{inputs.preset}}) on OTP ${{inputs.otp}}" + path-to-lcov: ./lcov.info + parallel: true \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69dba766ef3..1ef5a269fea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,41 +51,18 @@ jobs: preset: [internal_mnesia, pgsql_mnesia, mysql_redis, odbc_mssql_mnesia, ldap_mnesia, elasticsearch_and_cassandra_mnesia] otp: [ '24.3.4', '25.2' ] + include: + - tls-dist: false + - preset: internal_mnesia + tls-dist: true runs-on: ubuntu-20.04 - env: - PRESET: ${{matrix.preset}} steps: - uses: actions/checkout@v3 - - uses: erlef/setup-beam@v1 - with: - otp-version: ${{matrix.otp}} - - uses: actions/cache@v3 + - uses: ./.github/actions/big-tests with: - path: ~/.cache/rebar3 - key: rebar3-${{ hashFiles('rebar.lock') }} - - name: create certificates - run: make certs - - name: set required env variables for preset - run: tools/gh-actions-configure-preset.sh "$PRESET" - - if: ${{ matrix.preset == 'odbc_mssql_mnesia' }} - run: sudo apt-get install -y tdsodbc - - name: build releases - run: tools/build-releases.sh - - name: build big tests - run: tools/build-tests.sh - - name: start backends - run: tools/setup-db.sh - - name: run test - run: tools/test.sh -p $PRESET -s false -e false - - name: prepare coverage report - run: ./rebar3 codecov analyze --lcov --json false - - name: report coverage - uses: coverallsapp/github-action@v2 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - flag-name: ${{matrix.preset}} on OTP ${{matrix.otp}} - path-to-lcov: ./lcov.info - parallel: true + otp: ${{matrix.otp}} + preset: ${{matrix.preset}} + tls-dist: ${{matrix.tls-dist}} coveralls_webhook: needs: [big_tests, small_tests]