Skip to content

Commit

Permalink
adding big-tests GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysGonchar committed Mar 23, 2023
1 parent 9bdd392 commit b8bd113
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 31 deletions.
54 changes: 54 additions & 0 deletions .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
39 changes: 8 additions & 31 deletions .github/workflows/ci.yml
Expand Up @@ -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]
Expand Down

0 comments on commit b8bd113

Please sign in to comment.