From 027dc5503678ca3f968dc51accf75f25121a8ab9 Mon Sep 17 00:00:00 2001 From: ohuynh21 <100678197+ohuynh21@users.noreply.github.com> Date: Sun, 11 Jun 2023 19:02:04 -0700 Subject: [PATCH 1/5] tried to combine all workflow into one --- .github/workflows/ci-cd.yml | 56 +++++++++++++++++++++++++++++++++++ .github/workflows/jsdocs.yml | 28 ------------------ .github/workflows/lint.yml | 14 --------- .github/workflows/node.js.yml | 16 ---------- 4 files changed, 56 insertions(+), 58 deletions(-) create mode 100644 .github/workflows/ci-cd.yml delete mode 100644 .github/workflows/jsdocs.yml delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 00000000..5660a4b8 --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,56 @@ +name: CI/CD Pipeline +run-name: Action by @${{ github.actor }} +on: + push: + +permissions: + contents: write + +jobs: + lint check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install modules + run: yarn + - name: Run ESLint + run: npm run lint + + format check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install modules + run: yarn + - name: Check if Prettier could format code + run: npx prettier --check --no-config . + + testing: + needs: checks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run Tests + run: npm install && npm test + + jsdocs: + needs: testing + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Build JSDOCS + uses: andstor/jsdoc-action@v1 + with: + source_dir: ./source + recurse: true + output_dir: ./JSDOCs + config_file: .jsdoc.conf.json + template: minami + - name: Commit JSDOCS + uses: EndBug/add-and-commit@v9 + with: + author_name: GitHub Actions + author_email: noreply@github.com + message: "Generated JSDocs" + add: "JSDOCs/*" diff --git a/.github/workflows/jsdocs.yml b/.github/workflows/jsdocs.yml deleted file mode 100644 index 5b560dc5..00000000 --- a/.github/workflows/jsdocs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Generate JSDOCS -run-name: Action by @${{ github.actor }} -on: - push: - branches: - - main -permissions: - contents: write -jobs: - jsdocs: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Build JSDOCS - uses: andstor/jsdoc-action@v1 - with: - recurse: true - output_dir: ./JSDOCs - config_file: .jsdoc.conf.json - template: minami - - name: Commit JSDOCS - uses: EndBug/add-and-commit@v9 - with: - author_name: GitHub Actions - author_email: noreply@github.com - message: "Generated JSDocs" - add: "JSDOCs/*" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 4f95068d..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,14 +0,0 @@ -# https://github.com/marketplace/actions/run-eslint -name: Lint code formatting with ESLint -on: push -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install modules - run: yarn - - name: Run ESLint - run: npm run lint - - name: Check if Prettier could format code - run: npx prettier --check --no-config . diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index 692a356b..00000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,16 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: E2E/unit testing - -on: [push] - -jobs: - Jest: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Run Tests - run: | - npm install - npm test From 8d948fd1f0615cda49db3e741433d5583dd12498 Mon Sep 17 00:00:00 2001 From: ohuynh21 <100678197+ohuynh21@users.noreply.github.com> Date: Sun, 11 Jun 2023 19:02:46 -0700 Subject: [PATCH 2/5] typos --- .github/workflows/ci-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5660a4b8..29830bdb 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -7,7 +7,7 @@ permissions: contents: write jobs: - lint check: + lint_check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -16,7 +16,7 @@ jobs: - name: Run ESLint run: npm run lint - format check: + format_check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 788f8515fec1d146ad78abe378c938eecdba18a9 Mon Sep 17 00:00:00 2001 From: ohuynh21 <100678197+ohuynh21@users.noreply.github.com> Date: Sun, 11 Jun 2023 19:03:45 -0700 Subject: [PATCH 3/5] fixed order --- .github/workflows/ci-cd.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 29830bdb..6bd1547c 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -17,6 +17,7 @@ jobs: run: npm run lint format_check: + needs: lint_check runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -26,7 +27,7 @@ jobs: run: npx prettier --check --no-config . testing: - needs: checks + needs: format_check runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From bfc2e7b6ef9e27b5c4377d9daba11c998ff85803 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 12 Jun 2023 02:07:39 +0000 Subject: [PATCH 4/5] Generated JSDocs --- JSDOCs/FortuneCookie_fortuneCookie.js.html | 2 +- JSDOCs/FortuneCookie_fortunes.js.html | 2 +- JSDOCs/PalmReading_script.js.html | 2 +- JSDOCs/PalmReading_webcam.js.html | 2 +- JSDOCs/Wheel.html | 3655 +++++- ...odiac_compatibility_data_dataArray.js.html | 2 +- JSDOCs/Zodiac_compatibility_script.js.html | 2 +- ...Zodiac_compatibility_zodiac-angles.js.html | 2 +- JSDOCs/common_index.js.html | 2 +- JSDOCs/common_nav.js.html | 2 +- JSDOCs/global.html | 10296 +++++++++++++--- JSDOCs/home-page_script.js.html | 2 +- JSDOCs/index.html | 284 +- JSDOCs/utils.js.html | 2 +- 14 files changed, 12691 insertions(+), 1566 deletions(-) diff --git a/JSDOCs/FortuneCookie_fortuneCookie.js.html b/JSDOCs/FortuneCookie_fortuneCookie.js.html index 4083ef62..5aae42dd 100644 --- a/JSDOCs/FortuneCookie_fortuneCookie.js.html +++ b/JSDOCs/FortuneCookie_fortuneCookie.js.html @@ -24,7 +24,7 @@
diff --git a/JSDOCs/FortuneCookie_fortunes.js.html b/JSDOCs/FortuneCookie_fortunes.js.html index e48a519a..d6e15b83 100644 --- a/JSDOCs/FortuneCookie_fortunes.js.html +++ b/JSDOCs/FortuneCookie_fortunes.js.html @@ -24,7 +24,7 @@
diff --git a/JSDOCs/PalmReading_script.js.html b/JSDOCs/PalmReading_script.js.html index 8cb2c754..f6a5eefc 100644 --- a/JSDOCs/PalmReading_script.js.html +++ b/JSDOCs/PalmReading_script.js.html @@ -24,7 +24,7 @@
diff --git a/JSDOCs/PalmReading_webcam.js.html b/JSDOCs/PalmReading_webcam.js.html index 25f89826..248f42b2 100644 --- a/JSDOCs/PalmReading_webcam.js.html +++ b/JSDOCs/PalmReading_webcam.js.html @@ -24,7 +24,7 @@
diff --git a/JSDOCs/Wheel.html b/JSDOCs/Wheel.html index 82ad121d..b9bac82f 100644 --- a/JSDOCs/Wheel.html +++ b/JSDOCs/Wheel.html @@ -24,7 +24,7 @@
@@ -359,15 +359,17 @@
Type:
-

(private) angleOffset :number

+

(private) angle :number

- An offset to add to `#angle` before determining the mapped zodiac. The -right wheel has an offset of 180° because it takes the zodiac from the left -side of the wheel. + The rotation angle of the wheel image. + +Note that this may not be the angle to get the zodiac mapping from, since, +for example, the right wheel takes the zodiac from the left side of the +wheel.
@@ -403,7 +405,7 @@

(private)
Source:
@@ -435,14 +437,15 @@

Type:
-

(private) animating :MomentumInfo|null

+

(private) angleOffset :number

- Information about the wheel momentum animation, if the wheel momentum is -being animated. + An offset to add to `#angle` before determining the mapped zodiac. The +right wheel has an offset of 180° because it takes the zodiac from the left +side of the wheel.
@@ -478,7 +481,7 @@

(private) an
Source:
@@ -495,10 +498,7 @@

Type:
  • -MomentumInfo -| - -null +number
  • @@ -513,13 +513,15 @@
    Type:
    -

    (private) dateInput :HTMLInputElement

    +

    (private) angleOffset :number

    - The input element that displays the date range of the selected zodiac. + An offset to add to `#angle` before determining the mapped zodiac. The +right wheel has an offset of 180° because it takes the zodiac from the left +side of the wheel.
    @@ -555,7 +557,7 @@

    (private) da
    Source:
    @@ -572,7 +574,7 @@

    Type:
    • -HTMLInputElement +number
    • @@ -587,13 +589,14 @@
      Type:
      -

      (private) elem :HTMLElement

      +

      (private) animating :MomentumInfo|null

      - The wheel image that gets rotated. + Information about the wheel momentum animation, if the wheel momentum is +being animated.
      @@ -629,7 +632,7 @@

      (private) elemSource:
      @@ -646,7 +649,10 @@
      Type:
      • -HTMLElement +MomentumInfo +| + +null
      • @@ -661,14 +667,14 @@
        Type:
        -

        (private) FRICTION :number

        +

        (private) animating :MomentumInfo|null

        - The amount of friction to apply to a wheel spinning with momentum. In -degrees/ms^2. + Information about the wheel momentum animation, if the wheel momentum is +being animated.
        @@ -704,7 +710,7 @@

        (private) FRI
        Source:
        @@ -721,7 +727,10 @@

        Type:
        • -number +MomentumInfo +| + +null
        • @@ -736,36 +745,13 @@
          Type:
          -

          (private) handlePointerDown

          +

          (private) dateInput :HTMLInputElement

          - Event handler for the `pointerdown` event. - -We're using [pointer -events](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events) -rather than [mouse events](https://javascript.info/mouse-events-basics) or -[touch -events](https://developer.mozilla.org/en-US/docs/Web/API/Touch_events/Using_Touch_Events) -because pointer events have several advantages: - -- They're an all-in-one set of events that fire for both mouse cursors, - fingers, and pens (collectively called pointers). This means that I don't - need to add both `mousedown` and `touchstart` event listeners. -- The `setPointerCapture` method lets me receive `pointermove` and - `pointerup` events on the wheel image even when the pointer moves outside - of the element. For mouse and touch events, I would have to listen for - move events on the entire `document`. -- Combined with CSS `touch-action: none;`, I don't need to use - `event.preventDefault()` to prevent scrolling, which would also require - `{ passive: true }` when using touch events. -- Finally, the `pointercancel` event makes it nice in case the user holds - down their mouse and leaves the page. For mouse events, it will simply - not fire any event when this happens, so to the user when they return, - it'll look like the wheel is sticking to their cursor even though they - aren't holding it down. + The input element that displays the date range of the selected zodiac.
          @@ -801,7 +787,7 @@

          (private) <
          Source:
          @@ -814,6 +800,16 @@

          (private) < +
          Type:
          +
            +
          • + +HTMLInputElement + + +
          • +
          + @@ -823,13 +819,13 @@

          (private) <
          -

          (private) handlePointerMove

          +

          (private) dateInput :HTMLInputElement

          - Event handler for the `pointermove` event. + The input element that displays the date range of the selected zodiac.
          @@ -865,7 +861,7 @@

          (private) <
          Source:
          @@ -878,6 +874,16 @@

          (private) < +
          Type:
          +
            +
          • + +HTMLInputElement + + +
          • +
          + @@ -887,14 +893,13 @@

          (private) <
          -

          (private) handlePointerUp

          +

          (private) elem :HTMLElement

          - Event handler for the `pointerup` and `pointercancel` events. The latter -occurs if the user holds their mouse down then switches tabs. + The wheel image that gets rotated.
          @@ -930,7 +935,7 @@

          (private) Source:
          @@ -943,6 +948,16 @@

          (private) Type:

          +
            +
          • + +HTMLElement + + +
          • +
          + @@ -952,13 +967,13 @@

          (private) -

          (private) handleWheel

          +

          (private) elem :HTMLElement

          - Rotates the wheel based on the mouse wheel event. + The wheel image that gets rotated.
          @@ -994,7 +1009,7 @@

          (private)
          Source:
          @@ -1007,6 +1022,16 @@

          (private) +

          Type:
          +
            +
          • + +HTMLElement + + +
          • +
          + @@ -1016,15 +1041,14 @@

          (private)
          -

          (private) paint

          +

          (private) FRICTION :number

          - Simulates the wheel moving and updates the wheel rotation accordingly, in -an animation frame. Automatically stops and snaps to the nearest zodiac -when the wheel slows down. + The amount of friction to apply to a wheel spinning with momentum. In +degrees/ms^2.
          @@ -1060,7 +1084,7 @@

          (private) paint<
          Source:
          @@ -1073,6 +1097,16 @@

          (private) paint< +

          Type:
          +
            +
          • + +number + + +
          • +
          + @@ -1082,14 +1116,14 @@

          (private) paint<
          -

          (private) pointer :PointerInfo|null

          +

          (private) FRICTION :number

          - Information about the pointer dragging the wheel, if the wheel is being -dragged. + The amount of friction to apply to a wheel spinning with momentum. In +degrees/ms^2.
          @@ -1125,7 +1159,7 @@

          (private) poin
          Source:
          @@ -1142,10 +1176,7 @@

          Type:
          • -PointerInfo -| - -null +number
          • @@ -1160,15 +1191,36 @@
            Type:
            -

            (private) wheelTimeout :number|null

            +

            (private) handlePointerDown

            - The `setTimeout` ID of the delay after using the scroll wheel on the wheel -before trying to snap the wheel to the closest zodiac. This timeout gets -cleared if the user continues to scroll before the timeout runs. + Event handler for the `pointerdown` event. + +We're using [pointer +events](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events) +rather than [mouse events](https://javascript.info/mouse-events-basics) or +[touch +events](https://developer.mozilla.org/en-US/docs/Web/API/Touch_events/Using_Touch_Events) +because pointer events have several advantages: + +- They're an all-in-one set of events that fire for both mouse cursors, + fingers, and pens (collectively called pointers). This means that I don't + need to add both `mousedown` and `touchstart` event listeners. +- The `setPointerCapture` method lets me receive `pointermove` and + `pointerup` events on the wheel image even when the pointer moves outside + of the element. For mouse and touch events, I would have to listen for + move events on the entire `document`. +- Combined with CSS `touch-action: none;`, I don't need to use + `event.preventDefault()` to prevent scrolling, which would also require + `{ passive: true }` when using touch events. +- Finally, the `pointercancel` event makes it nice in case the user holds + down their mouse and leaves the page. For mouse events, it will simply + not fire any event when this happens, so to the user when they return, + it'll look like the wheel is sticking to their cursor even though they + aren't holding it down.
            @@ -1204,7 +1256,7 @@

            (private) Source:
            @@ -1217,31 +1269,3446 @@

            (private) Type:

            -
              -
            • - -number -| -null -
            • -
            + +
            + + + +
            +

            (private) handlePointerDown

            +
            + Event handler for the `pointerdown` event. + +We're using [pointer +events](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events) +rather than [mouse events](https://javascript.info/mouse-events-basics) or +[touch +events](https://developer.mozilla.org/en-US/docs/Web/API/Touch_events/Using_Touch_Events) +because pointer events have several advantages: +- They're an all-in-one set of events that fire for both mouse cursors, + fingers, and pens (collectively called pointers). This means that I don't + need to add both `mousedown` and `touchstart` event listeners. +- The `setPointerCapture` method lets me receive `pointermove` and + `pointerup` events on the wheel image even when the pointer moves outside + of the element. For mouse and touch events, I would have to listen for + move events on the entire `document`. +- Combined with CSS `touch-action: none;`, I don't need to use + `event.preventDefault()` to prevent scrolling, which would also require + `{ passive: true }` when using touch events. +- Finally, the `pointercancel` event makes it nice in case the user holds + down their mouse and leaves the page. For mouse events, it will simply + not fire any event when this happens, so to the user when they return, + it'll look like the wheel is sticking to their cursor even though they + aren't holding it down.
            - - - -

            Methods

            + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) handlePointerMove

            + + + + +
            + Event handler for the `pointermove` event. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) handlePointerMove

            + + + + +
            + Event handler for the `pointermove` event. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) handlePointerUp

            + + + + +
            + Event handler for the `pointerup` and `pointercancel` events. The latter +occurs if the user holds their mouse down then switches tabs. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) handlePointerUp

            + + + + +
            + Event handler for the `pointerup` and `pointercancel` events. The latter +occurs if the user holds their mouse down then switches tabs. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) handleWheel

            + + + + +
            + Rotates the wheel based on the mouse wheel event. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) handleWheel

            + + + + +
            + Rotates the wheel based on the mouse wheel event. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) paint

            + + + + +
            + Simulates the wheel moving and updates the wheel rotation accordingly, in +an animation frame. Automatically stops and snaps to the nearest zodiac +when the wheel slows down. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) paint

            + + + + +
            + Simulates the wheel moving and updates the wheel rotation accordingly, in +an animation frame. Automatically stops and snaps to the nearest zodiac +when the wheel slows down. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) pointer :PointerInfo|null

            + + + + +
            + Information about the pointer dragging the wheel, if the wheel is being +dragged. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            + + + + + + +
            + + + +
            +

            (private) pointer :PointerInfo|null

            + + + + +
            + Information about the pointer dragging the wheel, if the wheel is being +dragged. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            + + + + + + +
            + + + +
            +

            (private) wheelTimeout :number|null

            + + + + +
            + The `setTimeout` ID of the delay after using the scroll wheel on the wheel +before trying to snap the wheel to the closest zodiac. This timeout gets +cleared if the user continues to scroll before the timeout runs. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +number +| + +null + + +
            • +
            + + + + + +
            + + + +
            +

            (private) wheelTimeout :number|null

            + + + + +
            + The `setTimeout` ID of the delay after using the scroll wheel on the wheel +before trying to snap the wheel to the closest zodiac. This timeout gets +cleared if the user continues to scroll before the timeout runs. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +number +| + +null + + +
            • +
            + + + + + +
            + + + + + +

            Methods

            + + + +
            + + + +

            getMapping() → {string}

            + + + + + +
            + Calculates the zodiac that the wheel's arrow is pointing to. If the wheel +rotation angle is not at a perfect multiple of 30°, it will round the angle +to determine which zodiac the arrow is pointing at. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + + + + + + + + + + + + + + + +
            +
            Returns:
            + + + +
            +
            + Type: +
            +
            + +string + + +
            +
            + + +
            + The zodiac. +
            + + +
            + + + +
            + + +
            + + + +

            getMapping() → {string}

            + + + + + +
            + Calculates the zodiac that the wheel's arrow is pointing to. If the wheel +rotation angle is not at a perfect multiple of 30°, it will round the angle +to determine which zodiac the arrow is pointing at. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + + + + + + + + + + + + + + + +
            +
            Returns:
            + + + +
            +
            + Type: +
            +
            + +string + + +
            +
            + + +
            + The zodiac. +
            + + +
            + + + +
            + + + + + + + + + + + + + + + + +
            + +
            + +

            + Wheel +

            + +
            A rotatable zodiac wheel. + +All units of rotation are in degrees, and units of time are in milliseconds.
            + + +
            + +
            +
            + + +
            + + +

            Constructor

            + + +

            new Wheel(elem, dateInput, angleOffset)

            + + + + + +
            + Constructs a `Wheel` based on existing DOM elements. Adds event listeners +to the wheel image. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + + + +
            Parameters:
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            NameTypeDefaultDescription
            elem + + +HTMLElement + + + + + + + The wheel image element. + +
            dateInput + + +HTMLInputElement + + + + + + + The date input that shows the date +range of the selected zodiac. + +
            angleOffset + + +number + + + + + + 0 + + + The offset to add to the visual rotation +angle of the wheel before determining the mapped zodiac. Default: 0. + +
            + + + + + + + + + + + + + + + + +
            + +
            + + + + + + + + + + + + +

            Members

            + + + +
            +

            (private) angle :number

            + + + + +
            + The rotation angle of the wheel image. + +Note that this may not be the angle to get the zodiac mapping from, since, +for example, the right wheel takes the zodiac from the left side of the +wheel. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +number + + +
            • +
            + + + + + +
            + + + +
            +

            (private) angle :number

            + + + + +
            + The rotation angle of the wheel image. + +Note that this may not be the angle to get the zodiac mapping from, since, +for example, the right wheel takes the zodiac from the left side of the +wheel. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +number + + +
            • +
            + + + + + +
            + + + +
            +

            (private) angleOffset :number

            + + + + +
            + An offset to add to `#angle` before determining the mapped zodiac. The +right wheel has an offset of 180° because it takes the zodiac from the left +side of the wheel. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +number + + +
            • +
            + + + + + +
            + + + +
            +

            (private) angleOffset :number

            + + + + +
            + An offset to add to `#angle` before determining the mapped zodiac. The +right wheel has an offset of 180° because it takes the zodiac from the left +side of the wheel. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +number + + +
            • +
            + + + + + +
            + + + +
            +

            (private) animating :MomentumInfo|null

            + + + + +
            + Information about the wheel momentum animation, if the wheel momentum is +being animated. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            + + + + + + +
            + + + +
            +

            (private) animating :MomentumInfo|null

            + + + + +
            + Information about the wheel momentum animation, if the wheel momentum is +being animated. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            + + + + + + +
            + + + +
            +

            (private) dateInput :HTMLInputElement

            + + + + +
            + The input element that displays the date range of the selected zodiac. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +HTMLInputElement + + +
            • +
            + + + + + +
            + + + +
            +

            (private) dateInput :HTMLInputElement

            + + + + +
            + The input element that displays the date range of the selected zodiac. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +HTMLInputElement + + +
            • +
            + + + + + +
            + + + +
            +

            (private) elem :HTMLElement

            + + + + +
            + The wheel image that gets rotated. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +HTMLElement + + +
            • +
            + + + + + +
            + + + +
            +

            (private) elem :HTMLElement

            + + + + +
            + The wheel image that gets rotated. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +HTMLElement + + +
            • +
            + + + + + +
            + + + +
            +

            (private) FRICTION :number

            + + + + +
            + The amount of friction to apply to a wheel spinning with momentum. In +degrees/ms^2. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +number + + +
            • +
            + + + + + +
            + + + +
            +

            (private) FRICTION :number

            + + + + +
            + The amount of friction to apply to a wheel spinning with momentum. In +degrees/ms^2. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +number + + +
            • +
            + + + + + +
            + + + +
            +

            (private) handlePointerDown

            + + + + +
            + Event handler for the `pointerdown` event. + +We're using [pointer +events](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events) +rather than [mouse events](https://javascript.info/mouse-events-basics) or +[touch +events](https://developer.mozilla.org/en-US/docs/Web/API/Touch_events/Using_Touch_Events) +because pointer events have several advantages: + +- They're an all-in-one set of events that fire for both mouse cursors, + fingers, and pens (collectively called pointers). This means that I don't + need to add both `mousedown` and `touchstart` event listeners. +- The `setPointerCapture` method lets me receive `pointermove` and + `pointerup` events on the wheel image even when the pointer moves outside + of the element. For mouse and touch events, I would have to listen for + move events on the entire `document`. +- Combined with CSS `touch-action: none;`, I don't need to use + `event.preventDefault()` to prevent scrolling, which would also require + `{ passive: true }` when using touch events. +- Finally, the `pointercancel` event makes it nice in case the user holds + down their mouse and leaves the page. For mouse events, it will simply + not fire any event when this happens, so to the user when they return, + it'll look like the wheel is sticking to their cursor even though they + aren't holding it down. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) handlePointerDown

            + + + + +
            + Event handler for the `pointerdown` event. + +We're using [pointer +events](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events) +rather than [mouse events](https://javascript.info/mouse-events-basics) or +[touch +events](https://developer.mozilla.org/en-US/docs/Web/API/Touch_events/Using_Touch_Events) +because pointer events have several advantages: + +- They're an all-in-one set of events that fire for both mouse cursors, + fingers, and pens (collectively called pointers). This means that I don't + need to add both `mousedown` and `touchstart` event listeners. +- The `setPointerCapture` method lets me receive `pointermove` and + `pointerup` events on the wheel image even when the pointer moves outside + of the element. For mouse and touch events, I would have to listen for + move events on the entire `document`. +- Combined with CSS `touch-action: none;`, I don't need to use + `event.preventDefault()` to prevent scrolling, which would also require + `{ passive: true }` when using touch events. +- Finally, the `pointercancel` event makes it nice in case the user holds + down their mouse and leaves the page. For mouse events, it will simply + not fire any event when this happens, so to the user when they return, + it'll look like the wheel is sticking to their cursor even though they + aren't holding it down. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) handlePointerMove

            + + + + +
            + Event handler for the `pointermove` event. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) handlePointerMove

            + + + + +
            + Event handler for the `pointermove` event. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) handlePointerUp

            + + + + +
            + Event handler for the `pointerup` and `pointercancel` events. The latter +occurs if the user holds their mouse down then switches tabs. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) handlePointerUp

            + + + + +
            + Event handler for the `pointerup` and `pointercancel` events. The latter +occurs if the user holds their mouse down then switches tabs. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) handleWheel

            + + + + +
            + Rotates the wheel based on the mouse wheel event. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) handleWheel

            + + + + +
            + Rotates the wheel based on the mouse wheel event. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) paint

            + + + + +
            + Simulates the wheel moving and updates the wheel rotation accordingly, in +an animation frame. Automatically stops and snaps to the nearest zodiac +when the wheel slows down. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) paint

            + + + + +
            + Simulates the wheel moving and updates the wheel rotation accordingly, in +an animation frame. Automatically stops and snaps to the nearest zodiac +when the wheel slows down. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + +
            + + + +
            +

            (private) pointer :PointerInfo|null

            + + + + +
            + Information about the pointer dragging the wheel, if the wheel is being +dragged. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            + + + + + + +
            + + + +
            +

            (private) pointer :PointerInfo|null

            + + + + +
            + Information about the pointer dragging the wheel, if the wheel is being +dragged. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            + + + + + + +
            + + + +
            +

            (private) wheelTimeout :number|null

            + + + + +
            + The `setTimeout` ID of the delay after using the scroll wheel on the wheel +before trying to snap the wheel to the closest zodiac. This timeout gets +cleared if the user continues to scroll before the timeout runs. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +number +| + +null + + +
            • +
            + + + + + +
            + + + +
            +

            (private) wheelTimeout :number|null

            + + + + +
            + The `setTimeout` ID of the delay after using the scroll wheel on the wheel +before trying to snap the wheel to the closest zodiac. This timeout gets +cleared if the user continues to scroll before the timeout runs. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + +
            Type:
            +
              +
            • + +number +| + +null + + +
            • +
            + + + + + +
            + + + + + +

            Methods

            + + + +
            + + + +

            getMapping() → {string}

            + + + + + +
            + Calculates the zodiac that the wheel's arrow is pointing to. If the wheel +rotation angle is not at a perfect multiple of 30°, it will round the angle +to determine which zodiac the arrow is pointing at. +
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + + + + + + + + + + + + + + + + + + +
            +
            Returns:
            + + + +
            +
            + Type: +
            +
            + +string + + +
            +
            + + +
            + The zodiac. +
            + + +
            + + + +
            diff --git a/JSDOCs/Zodiac_compatibility_data_dataArray.js.html b/JSDOCs/Zodiac_compatibility_data_dataArray.js.html index d9af3d6a..4c19f801 100644 --- a/JSDOCs/Zodiac_compatibility_data_dataArray.js.html +++ b/JSDOCs/Zodiac_compatibility_data_dataArray.js.html @@ -24,7 +24,7 @@
            diff --git a/JSDOCs/Zodiac_compatibility_script.js.html b/JSDOCs/Zodiac_compatibility_script.js.html index ec1a729f..8d91aa93 100644 --- a/JSDOCs/Zodiac_compatibility_script.js.html +++ b/JSDOCs/Zodiac_compatibility_script.js.html @@ -24,7 +24,7 @@
            diff --git a/JSDOCs/Zodiac_compatibility_zodiac-angles.js.html b/JSDOCs/Zodiac_compatibility_zodiac-angles.js.html index 42e42355..ce7fe9d4 100644 --- a/JSDOCs/Zodiac_compatibility_zodiac-angles.js.html +++ b/JSDOCs/Zodiac_compatibility_zodiac-angles.js.html @@ -24,7 +24,7 @@
            diff --git a/JSDOCs/common_index.js.html b/JSDOCs/common_index.js.html index 3f82889a..644838a6 100644 --- a/JSDOCs/common_index.js.html +++ b/JSDOCs/common_index.js.html @@ -24,7 +24,7 @@
            diff --git a/JSDOCs/common_nav.js.html b/JSDOCs/common_nav.js.html index 2b82c538..1b3212b5 100644 --- a/JSDOCs/common_nav.js.html +++ b/JSDOCs/common_nav.js.html @@ -24,7 +24,7 @@
            diff --git a/JSDOCs/global.html b/JSDOCs/global.html index 5a34f3b0..4526f835 100644 --- a/JSDOCs/global.html +++ b/JSDOCs/global.html @@ -24,7 +24,7 @@
            @@ -186,13 +186,13 @@
            Type:
            -

            cookieFalling :boolean

            +

            (constant) context :CanvasRenderingContext2D

            - Whether to animate a new cookie falling. + The `CanvasRenderingContext2D` for `result`.
            @@ -228,7 +228,7 @@

            cookieFa
            Source:
            @@ -245,7 +245,7 @@

            Type:
            • -boolean +CanvasRenderingContext2D
            • @@ -260,13 +260,13 @@
              Type:
              -

              (constant) ECG_LENGTH :number

              +

              cookieFalling :boolean

              - The number of SVG units in width of the fake heartbeat graph. + Whether to animate a new cookie falling.
              @@ -302,7 +302,7 @@

              (constant)
              Source:
              @@ -319,7 +319,7 @@

              Type:
              • -number +boolean
              • @@ -334,13 +334,13 @@
                Type:
                -

                (constant) ecgGraph :SVGSVGElement

                +

                cookieFalling :boolean

                - The heartbeat graph. + Whether to animate a new cookie falling.
                @@ -376,7 +376,7 @@

                (constant) ec
                Source:
                @@ -393,7 +393,7 @@

                Type:
                • -SVGSVGElement +boolean
                • @@ -408,14 +408,13 @@
                  Type:
                  -

                  (constant) ecgHistory :Array.<number>

                  +

                  (constant) ECG_LENGTH :number

                  - A queue of points (new elements added to the beginning) representing the ECG -graph. Kept to a maximum of `ECG_LENGTH` items. + The number of SVG units in width of the fake heartbeat graph.
                  @@ -451,7 +450,7 @@

                  (constant)
                  Source:
                  @@ -468,7 +467,7 @@

                  Type:
                  • -Array.<number> +number
                  • @@ -483,13 +482,13 @@
                    Type:
                    -

                    (constant) ecgPath :SVGPathElement

                    +

                    (constant) ECG_LENGTH :number

                    - The `` element that draws the ECG graph. + The number of SVG units in width of the fake heartbeat graph.
                    @@ -525,7 +524,7 @@

                    (constant) ecg
                    Source:
                    @@ -542,7 +541,7 @@

                    Type:
                    • -SVGPathElement +number
                    • @@ -557,15 +556,13 @@
                      Type:
                      -

                      (constant) ecgPoints :Array.<Array.<number, number>>

                      +

                      (constant) ecgGraph :SVGSVGElement

                      - Some points on an image of an ECG graph I found on Google Images that I -manually marked out in MS Paint. Used to form the piecewise linear `ecg` -polyline. + The heartbeat graph.
                      @@ -601,7 +598,7 @@

                      (constant) e
                      Source:
                      @@ -618,7 +615,7 @@

                      Type:
                      • -Array.<Array.<number, number>> +SVGSVGElement
                      • @@ -633,13 +630,13 @@
                        Type:
                        -

                        flipCamera :boolean

                        +

                        (constant) ecgGraph :SVGSVGElement

                        - Whether the camera should be horizontally flipped (for front-facing cameras). + The heartbeat graph.
                        @@ -675,7 +672,7 @@

                        flipCamera<
                        Source:
                        @@ -692,7 +689,7 @@

                        Type:
                        • -boolean +SVGSVGElement
                        • @@ -707,13 +704,14 @@
                          Type:
                          -

                          (constant) fortunes :Array.<string>

                          +

                          (constant) ecgHistory :Array.<number>

                          - Array of general, college, and collage-romance type fortunes + A queue of points (new elements added to the beginning) representing the ECG +graph. Kept to a maximum of `ECG_LENGTH` items.
                          @@ -749,7 +747,7 @@

                          (constant) fo
                          Source:
                          @@ -766,7 +764,7 @@

                          Type:
                          • -Array.<string> +Array.<number>
                          • @@ -781,14 +779,14 @@
                            Type:
                            -

                            (constant) FPS :number

                            +

                            (constant) ecgHistory :Array.<number>

                            - The FPS of the animation. `paintEcg` will try to keep the animation at this -rate, for displays that have slower or faster refresh rates. + A queue of points (new elements added to the beginning) representing the ECG +graph. Kept to a maximum of `ECG_LENGTH` items.
                            @@ -824,7 +822,7 @@

                            (constant) FPSSource:
                            @@ -841,7 +839,7 @@
                            Type:
                            • -number +Array.<number>
                            • @@ -856,14 +854,13 @@
                              Type:
                              -

                              frameId :number|null

                              +

                              (constant) ecgPath :SVGPathElement

                              - The ID returned by `window.requestAnimationFrame`, used to cancel it or -determine whether it is animating. `null` if `paintEcg` is not animating. + The `` element that draws the ECG graph.
                              @@ -899,7 +896,7 @@

                              frameIdSource:
                              @@ -916,10 +913,7 @@
                              Type:
                              • -number -| - -null +SVGPathElement
                              • @@ -934,14 +928,13 @@
                                Type:
                                -

                                (constant) GRAVITY :number

                                +

                                (constant) ecgPath :SVGPathElement

                                - The acceleration due to "gravity" applied on all falling objects in the -animation, in px/ms^2. + The `` element that draws the ECG graph.
                                @@ -977,7 +970,7 @@

                                (constant) GRA
                                Source:
                                @@ -994,7 +987,7 @@

                                Type:
                                • -number +SVGPathElement
                                • @@ -1009,13 +1002,15 @@
                                  Type:
                                  -

                                  lastInstructionElem :HTMLParagraphElement|null

                                  +

                                  (constant) ecgPoints :Array.<Array.<number, number>>

                                  - The currently displayed `.instructions` element. + Some points on an image of an ECG graph I found on Google Images that I +manually marked out in MS Paint. Used to form the piecewise linear `ecg` +polyline.
                                  @@ -1051,7 +1046,7 @@

                                  la
                                  Source:
                                  @@ -1068,10 +1063,7 @@

                                  Type:
                                  • -HTMLParagraphElement -| - -null +Array.<Array.<number, number>>
                                  • @@ -1086,13 +1078,15 @@
                                    Type:
                                    -

                                    lastTime :number

                                    +

                                    (constant) ecgPoints :Array.<Array.<number, number>>

                                    - The timestamp of the last time `paint` was called. + Some points on an image of an ECG graph I found on Google Images that I +manually marked out in MS Paint. Used to form the piecewise linear `ecg` +polyline.
                                    @@ -1128,7 +1122,7 @@

                                    lastTimeSource:
                                    @@ -1145,7 +1139,7 @@
                                    Type:
                                    • -number +Array.<Array.<number, number>>
                                    • @@ -1160,13 +1154,13 @@
                                      Type:
                                      -

                                      (constant) leftWheel :Wheel

                                      +

                                      flipCamera :boolean

                                      - The left wheel. + Whether the camera should be horizontally flipped (for front-facing cameras).
                                      @@ -1202,7 +1196,7 @@

                                      (constant) l
                                      Source:
                                      @@ -1219,7 +1213,7 @@

                                      Type:
                                      • -Wheel +boolean
                                      • @@ -1234,13 +1228,13 @@
                                        Type:
                                        - +

                                        flipCamera :boolean

                                        - The list of entries in the navigation menu. + Whether the camera should be horizontally flipped (for front-facing cameras).
                                        @@ -1276,7 +1270,7 @@
                                        Type:
                                        • -Array.<Link> +boolean
                                        • @@ -1308,14 +1302,13 @@
                                          Type:
                                          - +

                                          (constant) fortunes :Array.<string>

                                          - The menu icon, which is a focusable element to allow the menu contents to be -tab accessible. + Array of general, college, and collage-romance type fortunes
                                          @@ -1351,7 +1344,7 @@
                                          Type:
                                          • -HTMLAnchorElement +Array.<string>
                                          • @@ -1383,14 +1376,13 @@
                                            Type:
                                            - +

                                            (constant) fortunes :Array.<string>

                                            - The created `
                                            @@ -1426,7 +1418,7 @@

            + +
            + + + + + + + +
            + +
            + +

            + common/index.js +

            + + +
            + +
            +
            + + +
            A JavaScript file that is included on every page. If we want to apply a +script onto every page for consistency, this is the place to do so.
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + +
            + + + + + + + + + + + + + + + + + + +
            + +
            + + + + + + + +
            + +
            + +

            + common/nav.js +

            + + +
            + +
            +
            + + +
            Creates a navigation menu that gets added to all pages on the web app, +linking all pages with each other.
            + + + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Source:
            +
            + + + + + + + +
            + + + + +
            + + + + + + + + + + + + + + + + + +
            @@ -286,6 +474,100 @@

            + + + + + + +
            Source:
            +
            + + + + + + + + + + + + +

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          + +
          + +

          + utils.js +

          + + +
          + +
          +
          + + +
          Utility functions. Conveniently, these functions are good candidates +for unit tests.
          + + + + + +
          + + + + + + + + + + + + + + + + + + + + diff --git a/JSDOCs/utils.js.html b/JSDOCs/utils.js.html index dd3d3bc7..b6ed4e64 100644 --- a/JSDOCs/utils.js.html +++ b/JSDOCs/utils.js.html @@ -24,7 +24,7 @@
          From b263a82470803f6b627ac0036099af0ae2ad41b6 Mon Sep 17 00:00:00 2001 From: ohuynh21 <100678197+ohuynh21@users.noreply.github.com> Date: Sun, 11 Jun 2023 19:56:00 -0700 Subject: [PATCH 5/5] simplified workflows --- .github/workflows/{ci-cd.yml => main.yml} | 13 +------------ .github/workflows/testing.yml | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 12 deletions(-) rename .github/workflows/{ci-cd.yml => main.yml} (79%) create mode 100644 .github/workflows/testing.yml diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/main.yml similarity index 79% rename from .github/workflows/ci-cd.yml rename to .github/workflows/main.yml index 6bd1547c..d1de89d2 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,4 @@ -name: CI/CD Pipeline -run-name: Action by @${{ github.actor }} +name: Lint, Check Format, and Generate JSDocs on: push: @@ -17,7 +16,6 @@ jobs: run: npm run lint format_check: - needs: lint_check runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -26,16 +24,7 @@ jobs: - name: Check if Prettier could format code run: npx prettier --check --no-config . - testing: - needs: format_check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Run Tests - run: npm install && npm test - jsdocs: - needs: testing runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 00000000..f986ad3c --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,15 @@ +name: Post Pages Deployment Testing +on: + workflow_run: + workflows: + - "pages-build-deployment" + types: + - completed + +jobs: + testing: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run Tests + run: npm install && npm test