Skip to content

Commit

Permalink
test actiosn
Browse files Browse the repository at this point in the history
  • Loading branch information
pkarolyi committed Apr 27, 2024
1 parent bd44cc0 commit 9f68304
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 57 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/ci.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/docker.yml

This file was deleted.

89 changes: 89 additions & 0 deletions .github/workflows/push_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: ⚒️ build 🧪 test 🚀 deploy

on:
push:
branches: ["main", "action-test"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: "20.12"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
lint:
runs-on: ubuntu-22.04
needs: build
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: "20.12"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Lint
run: pnpm lint
test:
runs-on: ubuntu-22.04
needs: build
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: "20.12"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Test
run: pnpm test:cov
test-e2e:
runs-on: ubuntu-22.04
needs: build
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: "20.12"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Test e2e
run: pnpm test:e2e
push_to_registry:
name: Push Docker image to Docker Hub
needs: [build, lint, test, test-e2e]
runs-on: ubuntu-latest
steps:
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/metadata-action@v5
id: meta
with:
images: pkarolyi/garden-snail
- uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 9f68304

Please sign in to comment.