ci: Add alpine-based Dockerfile for integration-testing package scripts #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI-Docker | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
test-dev-alpine: | |
name: test-dev-alpine | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2 | |
with: | |
driver: docker-container | |
driver-opts: | | |
image=docker.io/moby/buildkit:master@sha256:1b6abfd9bbfbf129245dc1f288aa38f064dfee8d608b8be9086936f5580c78f2 | |
- name: Build OCI image | |
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4 | |
with: | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
context: . | |
file: test/integration/Dockerfile-alpine | |
load: true | |
push: false | |
tags: dev:latest | |
- name: lint | |
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 | |
with: | |
image: dev:latest | |
run: 'npm run lint && npm run lint:fix' | |
- name: publish | |
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 | |
env: | |
VERDACCIO_STORAGE_PATH: /app/verdaccio/storage | |
with: | |
image: dev:latest | |
run: > | |
git init -b main && | |
git add package.json packages/*/package.json && | |
git commit -m 'feat!: Add manifests' && | |
npm ci && | |
(verdaccio &) && | |
sleep 7 && | |
npm set registry http://localhost:4873 && | |
sh -c '(echo user; sleep 0.5; echo password; sleep 0.5; echo email@example.com) | npm --registry=http://localhost:4873 adduser --auth-type legacy' && | |
npm run publish -- -y | |
- name: rebuild | |
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 | |
with: | |
image: dev:latest | |
run: npm run setup && npm run rebuild | |
- name: lint:git | |
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 | |
with: | |
image: dev:latest | |
run: > | |
git init -b main && | |
git add README.md && npm run lint:staged && | |
git commit -m 'docs: Add README.md' && npm run lint:commit -- -e | |
- name: test | |
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 | |
with: | |
image: dev:latest | |
run: npm run test:prep && npm run test |