Skip to content

Commit

Permalink
chore: explore GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ardikabs committed Sep 3, 2023
1 parent 944ccb1 commit 38258a4
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Test

on:
pull_request:
branches:
- "master"
# # manual trigger workflow
# workflow_dispatch: {}
# #
# workflow_run: {}
# # reusable workflow
# workflow_call: {}

jobs:
unit-test:
runs-on: stg-local
steps:
- run: echo ${{ secrets.GITHUB_TOKEN }} | base64 -w0
- name: Breaking down `github` context
run: |
id
echo actor=${{ github.actor }}
echo action_ref=${{ github.action_ref }}
echo ref=${{ github.ref }}
echo ref_name=${{ github.ref_name }}
echo event_name=${{ github.event_name }}
echo event_path=${{ github.event_path }}
echo job=${{ github.job }}
echo PR=${{ github.event.pull_request.number }}
echo PR_root=${{ github.event.number }}
ls -alh /usr/local/bin
sudo apt update -y
sudo apt install git -y
- name: Checkout code
uses: actions/checkout@v3
- run: git rev-parse HEAD
- run: git log -1 --stat HEAD
- run: printenv
- run: ls -alh
- run: pwd
- run: sleep 10
shell: bash

integration-test:
runs-on: stg-local
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
- run: printenv
- run: ls -alh
- run: pwd
- run: sleep 10
shell: bash

regression-test:
runs-on: stg-local
needs:
- unit-test
- integration-test
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
- run: printenv
- run: ls -alh
- run: pwd
- run: sleep 10
shell: bash

0 comments on commit 38258a4

Please sign in to comment.