Skip to content

Bump lodash from 4.17.21 to 4.17.23 #121

Bump lodash from 4.17.21 to 4.17.23

Bump lodash from 4.17.21 to 4.17.23 #121

Workflow file for this run

name: Test and Build
on:
push:
paths-ignore:
- '**/README.md'
- '**/LICENSE'
- '**/.gitignore'
- 'CHANGELOG.md'
concurrency:
group: test-build-${{ github.ref_name }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
node_setup:
name: Node Setup
runs-on: ubuntu-latest
outputs:
node_version: ${{ steps.nvmrc.outputs.NODE_VERSION }}
steps:
- uses: actions/checkout@v4
- id: nvmrc
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- name: Use Node Version from nvmrc
uses: actions/setup-node@v4
with: { node-version: "${{ steps.nvmrc.outputs.NODE_VERSION }}" }
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
lint:
name: Lint
needs: node_setup
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: "${{ needs.node_setup.outputs.node_version }}" }
- uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
typecheck:
name: Typecheck
needs: node_setup
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: "${{ needs.node_setup.outputs.node_version }}" }
- uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm ci
- name: Typecheck
run: node_modules/typescript/bin/tsc --noEmit
test:
name: Test & Coverage
needs: node_setup
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: "${{ needs.node_setup.outputs.node_version }}" }
- uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm ci
- name: Test
run: npm run test:ci -- --coverage
- name: Coveralls Report
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
publish:
name: Publish image to Docker registry
needs: [lint, typecheck, test]
env:
REGISTRY_HOST: ghcr.io
IMAGE_PUSH_ENABLED: ${{ secrets.NO_DOCKER_IMAGE == null }}
# This gets us a real SHA for the SHA tag, instead of an ethereal one. See:
# - https://github.com/docker/metadata-action?tab=readme-ov-file#environment-variables
# - https://github.com/docker/metadata-action/issues/206
DOCKER_METADATA_PR_HEAD_SHA: true
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
# Using this multiple times, so set it once here.
- name: Set IMAGE_NAME in the environment
run: |
REPO_OWNER=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
echo "IMAGE_NAME=${{ env.REGISTRY_HOST }}/${REPO_OWNER}/${{ github.event.repository.name }}" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate tags for Docker image
id: docker-image-tags
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{major}}.{{minor}},priority=10
type=semver,pattern={{version}},priority=20
type=ref,event=branch,priority=30
type=sha,priority=40
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to the Docker registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY_HOST }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: ${{ env.IMAGE_PUSH_ENABLED }}
tags: ${{ steps.docker-image-tags.outputs.tags }}
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:build-cache
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:build-cache,mode=max