git.delta.rocks / unique-network / refs/commits / 3fcefa3e9092

difftreelog

source

.github/workflows/unit-test.yml3.1 KiBsourcehistory
1name: unit tests23# Controls when the action will run.4on:5 # Triggers the workflow on push or pull request events but only for the master branch6  pull_request:7    branches:8      - develop9      - master10    types:11      - opened12      - reopened13      - synchronize   #commit(s) pushed to the pull request14      - ready_for_review1516  # Allows you to run this workflow manually from the Actions tab17  workflow_dispatch:1819concurrency: 20  group: ${{ github.workflow }}-${{ github.head_ref }}21  cancel-in-progress: true2223# A workflow run is made up of one or more jobs that can run sequentially or in parallel24jobs:25  26  unit_tests:27    # The type of runner that the job will run on28    runs-on: [self-hosted-ci,medium]29    timeout-minutes: 13803031    name: ${{ github.base_ref }}3233    continue-on-error: true         #Do not stop testing of matrix runs failed.  As it decided during PR review - it required 50/50& Let's check it with false.343536    steps:37      - name: Skip if pull request is in Draft38        # `if: github.event.pull_request.draft == true` should be kept here, at39        # the step level, rather than at the job level. The latter is not40        # recommended because when the PR is moved from "Draft" to "Ready to41        # review" the workflow will immediately be passing (since it was skipped),42        # even though it hasn't actually ran, since it takes a few seconds for43        # the workflow to start. This is also disclosed in:44        # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/1745        # That scenario would open an opportunity for the check to be bypassed:46        # 1. Get your PR approved47        # 2. Move it to Draft48        # 3. Push whatever commits you want49        # 4. Move it to "Ready for review"; now the workflow is passing (it was50        #    skipped) and "Check reviews" is also passing (it won't be updated51        #    until the workflow is finished)52        if: github.event.pull_request.draft == true53        run: exit 15455      - name: Clean Workspace56        uses: AutoModality/action-clean@v1.1.05758      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it59      - uses: actions/checkout@v360        with:61          ref: ${{ github.head_ref }}  #Checking out head commit6263      - name: Read .env file64        uses: xom9ikk/dotenv@v1.0.26566      - name: Generate ENV related extend file for docker-compose67        uses: cuchi/jinja2-action@v1.2.068        with:69          template: .docker/docker-compose.tmp-unit.j270          output_file: .docker/docker-compose.unit.yml71          variables: |72            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}73            FEATURE=${{ matrix.features }}74    7576      - name: Show build configuration77        run: cat .docker/docker-compose.unit.yml7879      - name: Build the stack80        run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.unit.yml" up --build  --force-recreate --timeout 300 --remove-orphans --exit-code-from node-dev8182      - name: Stop running containers83        if: always()                   # run this step always84        run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.unit.yml" down