diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b203fd95..c8eab099 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,60 +11,36 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: '12.x' - - name: Cache Node.js modules - uses: actions/cache@v2 - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.OS }}-node- - ${{ runner.OS }}- + node-version: 'latest' + cache: 'npm' - run: npm ci - run: npm run lint compile: name: Compile runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: '12.x' - - name: Cache Node.js modules - uses: actions/cache@v2 + uses: actions/setup-node@v4 with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.OS }}-node- - ${{ runner.OS }}- + node-version: 'latest' + cache: 'npm' - run: npm ci - run: npm run build test: name: Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: '12.x' - - name: Cache Node.js modules - uses: actions/cache@v2 + uses: actions/setup-node@v4 with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.OS }}-node- - ${{ runner.OS }}- + node-version: 'latest' + cache: 'npm' - run: npm ci - name: Configure Datadog Test Visibility env: @@ -103,20 +79,12 @@ jobs: needs: [test, lint, compile, gatekeep] if: needs.gatekeep.outputs.proceed == 'true' steps: - - uses: actions/checkout@v2 - - name: Use Node.js 16.x - uses: actions/setup-node@v1 - with: - node-version: '16.x' - - name: Cache Node.js modules - uses: actions/cache@v2 + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.OS }}-node- - ${{ runner.OS }}- + node-version: 'latest' + cache: 'npm' - run: npm ci - run: | if [[ $GITHUB_REF == $STAGING_BRANCH ]]; then