Skip to content

Commit

Permalink
Update TPv2 in GitHub Actions to use nodejs 18
Browse files Browse the repository at this point in the history
  • Loading branch information
zrhoffman committed May 8, 2024
1 parent b407d45 commit a47d2f1
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 10 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/chromdriver-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ env:
PROJECTS:

jobs:
chromedriver-updater:
chromedriver-updater-tp:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
Expand All @@ -48,4 +48,29 @@ jobs:
GIT_AUTHOR_NAME: asf-ci-trafficcontrol
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_GITHUB_TOKEN: ${{ secrets.ASFCI_TOKEN }}
PROJECTS: "traffic_portal/test/integration/,experimental/traffic-portal/"
PROJECTS: "traffic_portal/test/integration/"

chromedriver-updater-tpv2:
runs-on: ubuntu-latest
needs:
- chromedriver-updater-tp
steps:
- name: Checkout repo
uses: actions/checkout@master
id: checkout
- name: Install Python 3.10
uses: actions/setup-python@v2
with: { python-version: '3.10' } # Must be quoted to include the trailing 0
- name: Install Node 16
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install updater Python module and dependencies
run: pip install .github/actions/chromedriver-updater
- name: Run chromedriver-updater
uses: ./.github/actions/chromedriver-updater
env:
GIT_AUTHOR_NAME: asf-ci-trafficcontrol
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_GITHUB_TOKEN: ${{ secrets.ASFCI_TOKEN }}
PROJECTS: "experimental/traffic-portal/"
18 changes: 10 additions & 8 deletions .github/workflows/tpv2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ name: Experimental Traffic Portal v2
env:
# alpine:3.13
ALPINE_VERSION: sha256:08d6ca16c60fe7490c03d10dc339d9fd8ea67c6466dea8d558526b1330a85930
NODE_VERSION: 18

on:
push:
Expand Down Expand Up @@ -55,14 +56,14 @@ jobs:
uses: actions/cache@v3
with:
path: ./experimental/traffic-portal/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('./experimental/traffic-portal/package-lock.json') }}
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('./experimental/traffic-portal/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Node 18
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: ${{ env.NODE_VERSION }}.x

- name: NPM install
if: steps.restore-npm-cache.cache-hit != 'true'
Expand All @@ -87,14 +88,15 @@ jobs:
uses: actions/cache@v3
with:
path: ./experimental/traffic-portal/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('./experimental/traffic-portal/package-lock.json') }}
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('./experimental/traffic-portal/package-lock.json') }}

restore-keys: |
${{ runner.os }}-node-
- name: Node 18
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: ${{ env.NODE_VERSION }}.x

- name: NPM install
if: steps.restore-npm-cache.cache-hit != 'true'
Expand All @@ -119,14 +121,14 @@ jobs:
uses: actions/cache@v3
with:
path: ./experimental/traffic-portal/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('./experimental/traffic-portal/package-lock.json') }}
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('./experimental/traffic-portal/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Node 18
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: ${{ env.NODE_VERSION }}.x

- name: Install latest Chrome
run: sudo apt-get update && sudo apt-get install google-chrome-stable
Expand Down Expand Up @@ -194,7 +196,7 @@ jobs:
uses: actions/cache@v3
with:
path: ./experimental/traffic-portal/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('./experimental/traffic-portal/package-lock.json') }}
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('./experimental/traffic-portal/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Initialize Traffic Ops Database
Expand Down Expand Up @@ -282,7 +284,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.npm
key: ${{ runner.os }}-node-modules-${{ hashFiles('experimental/traffic-portal/**/package*.json') }}-
key: ${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('./experimental/traffic-portal/package-lock.json') }}
- name: Build RPM
uses: ./.github/actions/build-rpms
env:
Expand Down

0 comments on commit a47d2f1

Please sign in to comment.