Skip to content

Commit

Permalink
Add GHA workflow that will do prettier check and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesir87 committed Nov 26, 2024
1 parent 77702e2 commit 83cec56
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/test-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build with GHA

on:
push: {}
workflow_dispatch:

jobs:
prettier:
name: "Validate code formatting"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install dependencies
run: yarn install

- name: Run Prettier
run: yarn run prettier-check

unit-test:
name: "Run tests"
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install dependencies
run: yarn install

- name: Run unit tests
run: yarn test

integration-test:
name: "Run integration tests"
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install dependencies
run: yarn install

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Setup Testcontainers Cloud Client
# uses: atomicjar/testcontainers-cloud-setup-action@v1
# with:
# token: ${{ secrets.TC_CLOUD_TOKEN }}

- name: Run integration tests
run: yarn run integration-test

0 comments on commit 83cec56

Please sign in to comment.