-
Notifications
You must be signed in to change notification settings - Fork 1
96 lines (87 loc) · 2.58 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Simple test
on:
# Triggers the workflow on push for staging branch
push:
branches:
- staging
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
instance_id:
description: 'Instance ID'
type: string
instance_image_id:
description: 'Instance AMI ID'
type: string
instance_type:
description: 'Instance product type'
type: string
runner_name:
description: 'Action runner name'
type: string
request_id:
description: 'Slab request ID'
type: string
fork_repo:
description: 'Name of forked repo'
type: string
fork_git_sha:
description: 'Git SHA to checkout from fork'
type: string
env:
REPOSITORY: ${{ inputs.fork_user || github.repository_owner}}/caesar-cipher
jobs:
tests1:
#runs-on: ubuntu-latest
runs-on: ${{ github.event.inputs.runner_name }}
steps:
- name: Instance configuration used
run: |
echo "IDs: ${{ github.event.inputs.instance_id }}"
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 }}"
echo "Fork user: ${{ github.event.inputs.fork_repo }}"
echo "Fork git sha: ${{ github.event.inputs.fork_git_sha }}"
- name: Checkout repository
uses: actions/checkout@v2
with:
repository: ${{ inputs.fork_repo }}
ref: ${{ inputs.fork_git_sha }}
- 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 120
# intermediate_test:
# needs: tests1
# runs-on: ubuntu-latest
# steps:
# - name: A intermediate sleep
# run: sleep 45
#
# tests2:
# runs-on: ${{ github.event.inputs.runner_name }}
# needs: intermediate_test
# steps:
# - uses: actions/checkout@v2
# #- name: Run test suite with cargo
# # run: cargo test
# - name: Another sleep
# run: echo 999999^999999 | bc