name: functionnal-tests on: push: branches-ignore: [ main, dev ] pull_request: branches-ignore: [ main, dev ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: toolchain: stable - uses: actions-rs/cargo@v1 with: command: build args: --release --all-features functionnal-tests: runs-on: ubuntu-latest needs: build steps: - uses: actions/checkout@v1 - name: Run a multi-line script timeout-minutes: 60 env: GITLAB_PROJECT_ID: ${{ secrets.GITLAB_PROJECT_ID }} GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} GITLAB_PERSONAL_TOKEN: ${{ secrets.GITLAB_PERSONAL_TOKEN }} run: | branch=$(echo ${{github.ref}} | sed -r 's/.+\/(.+)/\1/') echo "Branch name: $branch" export GITHUB_BRANCH=$branch export GITHUB_COMMIT_ID=$GITHUB_SHA gh_json=$(curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/Qovery/engine/pulls?state=open") gh_pr=$(echo $gh_json | jq --compact-output '.[] | {labels, ref: .head.ref}' | awk "/$branch/") echo "Pull request info: $(echo $gh_pr)" num_labels=$(echo $gh_pr | jq '.labels | length') tests_type="fast_tests" if [ $num_labels -gt 0 ] ; then if [ $(echo $gh_pr | grep -c 'full-tests') ] ; then tests_type="full_tests" fi fi echo $tests_type ./helper.sh $tests_type - name: automerge uses: "pascalgn/automerge-action@v0.12.0" env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" MERGE_LABELS: "merge_when_pipeline_succeeds" MERGE_METHOD: "rebase"