diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d36d1c4..1189e07 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,6 +24,15 @@ on: request_id: description: 'Slab request ID' type: string + fork_user: + description: 'User login of forked repo' + type: string + fork_git_ref: + description: 'Git ref to checkout from fork' + type: string + +env: + REPOSITORY: ${{ inputs.fork_user || github.repository_owner}}/caesar-cipher jobs: tests1: @@ -36,23 +45,38 @@ jobs: echo "AMI: ${{ github.event.inputs.instance_image_id }}" echo "Type: ${{ github.event.inputs.instance_type }}" echo "Request ID: ${{ github.event.inputs.request_id }}" - echo "Matrix item: ${{ github.event.inputs.matrix_item }}" - - uses: actions/checkout@v2 - - name: Set up home - run: | - echo "HOME=/home/ubuntu" >> ${GITHUB_ENV} - - name: Install Rust - if: ${{ !cancelled() }} - uses: actions-rs/toolchain@v1 + echo "Fork user: ${{ github.event.inputs.fork_user }}" + echo "Fork git ref: ${{ github.event.inputs.fork_git_ref }}" + + - name: Checkout repository + uses: actions/checkout@v2 with: - toolchain: stable - override: true - - name: Run test suite with cargo - run: cargo test + repository: ${{ env.REPOSITORY }} + ref: ${{ inputs.fork_git_ref }} + + - name: Show last commit + run: | + sudo apt install -y git + git show + +# - name: Set up home +# run: | +# echo "HOME=/home/ubuntu" >> ${GITHUB_ENV} +# +# - name: Install Rust +# if: ${{ !cancelled() }} +# uses: actions-rs/toolchain@v1 +# with: +# toolchain: stable +# override: true +# +# - name: Run test suite with cargo +# run: cargo test + - name: EC2 activity tracker check #run: echo 999999^999999 | bc - run: sleep 45 -# + run: sleep 120 + # intermediate_test: # needs: tests1 # runs-on: ubuntu-latest diff --git a/ci/slab.toml b/ci/slab.toml index 191dbb9..b206d62 100644 --- a/ci/slab.toml +++ b/ci/slab.toml @@ -1,6 +1,6 @@ [profile.cpu] region = "eu-west-3" -image_id = "ami-021d41cbdefc0c994" # AWS Linux x86 +image_id = "ami-05e8e219ac7e82eba" # ubuntu 22.04 instance_type = "t3.micro" subnet_id = "subnet-0e042c7621461f754"