Skip to content

fix: testing

fix: testing #962

name: Tests
on:
pull_request:
branches: [master, main, release-**]
jobs:
build:
strategy:
matrix:
node: [18.x, 20.x, 22.x]
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
exclude:
- os: windows-latest
node: 22.x
env:
TITLE: ${{ github.event.pull_request.title }}
runs-on: ${{ matrix.os }}
steps:
- name: Install python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: npm ci
- name: Lint the code
run: npm run lint
- name: Run tests
run: npm run test-with-coverage
- name: Log in to the Github Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ env.IMAGE_NAME }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: bigcommerce/stencil-cli:latest