From 5a8221e5cd0068e0eb83f760bb7f4496da3b6f03 Mon Sep 17 00:00:00 2001 From: Isabeth7 <158235341+Isabeth7@users.noreply.github.com> Date: Sun, 30 Jun 2024 13:01:05 -0500 Subject: [PATCH] Create workflow.yml workflow file --- .github/workflows/workflow.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..97e9b99 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,21 @@ +name: Unit Tests + +on: + # the 1st condition + workflow_run: # triggers when "build" runs and completes + workflows: ["CI-CD"] + types: + - completed + +jobs: # create job called "test" to perform Unit Tests + test: + runs-on: ubuntu-latest. # this job will run on the latest version of Ubuntu + steps: # list of steps that need to be taken when Unit Tests is triggered + - uses: actions/checkout@v3 # check out code from repository + - name: Install dependencies # install all dependencies needed for Unit Tests (ex. Jest) + run: npx yarn + - uses: actions/download-artifact@v3 # download compiled code from build and make it available for Unit Tests + with: + path: dist + - name: Run Tests # run Unit Tests using Jest + run: npx yarn test