Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: update for HDDS-5250 (buildenv no longer exists)

...

Code Block
languageyml
name: it-client
on:
  schedule:
   - cron: '*/30 * * * *'
jobs:
  it-client:
    name: it-client
    runs-on: ubuntu-18.04
    steps:
        - uses: actions/checkout@mastercheckout@v2
          with:
            ref: leader-election-problem
      - name: Cache for maven dependencies
       - uses: actions/cache@v2
        with:
          path: .~/.githubm2/buildenvrepository
          with:
key: maven-repo-${{ hashFiles('**/pom.xml') }}-8-single
          restore-keys: |
   args: ./         maven-repo-${{ hashFiles('**/pom.xml') }}-8
            maven-repo-${{ hashFiles('**/pom.xml') }}
            maven-repo-
      - name: Execute tests
        run: hadoop-ozone/dev-support/checks/integration.sh -Dtest=TestOzoneRpcClient
          env:
            ITERATIONS: 20
        - name: Summary of failures
          run: cat target/integration/summary.txt
          if: always()
      - name: Archive build results
       - uses: actions/upload-artifact@masterartifact@v2
          if: always()
          with:
            name: it-client
            path: target/integration
      - name: Delete temporary build artifacts before caching
        run: |
          #Never cache local artifacts
          rm -rf ~/.m2/repository/org/apache/ozone/hdds*
          rm -rf ~/.m2/repository/org/apache/ozone/ozone*
        if: always()

Important parameters:

  • Scheduling: modify the scheduling line (this test runs twice per hour: */30 * * *)
  • Branch: Which of your branches should be tested (in my case this is leader-election-problem)
  • Test name: which test should be executed. (put it after the integration.sh) Can be one or more tests (like -Dtest=TestCommitWatcher,TestWatchForCommit) or a profile (like -P=it-client)
  • Number of iterations: number of times the test should be run in the same scheduled run - tweak this depending on the schedule and time required for running the test once

...

Code Block
name: build-branch
on:
  - push
jobs:
  build:
    name: compile
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@master
      - name: Setup tmate session
        run: |
            sudo apt-get update
            sudo apt-get install -y tmate openssh-client
            echo -e 'y\n'|ssh-keygen -q -t rsa -N "" -f ~/.ssh/id_rsa
            tmate -S /tmp/tmate.sock new-session -d
            tmate -S /tmp/tmate.sock wait tmate-ready
            tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}'
            tmate -S /tmp/tmate.sock display -p '#{tmate_web}'
      - uses: ./.github/buildenv
        with:
          args: ./run: hadoop-ozone/dev-support/checks/build.sh
      - run: sleep 100000

...