Skip to content

Commit 61da458

Browse files
committed
Added GitHub action
1 parent 755955c commit 61da458

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: [oskardudycz]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/build_and_test.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build and test Sample - WebApi with Express.js and EventStoreDB
2+
3+
on:
4+
# run it on push to the default repository branch
5+
push:
6+
branches: [main]
7+
# run it during pull request
8+
pull_request:
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
jobs:
14+
build-and-test-code:
15+
name: Build application code
16+
# use system defined below in the tests matrix
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Check Out Repo
21+
uses: actions/checkout@v4
22+
23+
- name: Use Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version-file: ./.nvmrc
27+
cache: 'npm'
28+
cache-dependency-path: './package-lock.json'
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build TS
34+
run: npm run build:ts
35+
36+
- name: Run linting (ESlint and Prettier)
37+
run: npm run lint
38+
39+
- name: Build
40+
run: npm run build
41+
42+
- name: Test
43+
run: npm run test
44+
45+
- name: Set up Docker Buildx
46+
id: buildx
47+
uses: docker/setup-buildx-action@v2
48+
49+
- name: Build Docker
50+
id: docker_build
51+
uses: docker/build-push-action@v4
52+
with:
53+
context: './samples/webApi/expressjs-with-esdb'
54+
push: false
55+
tags: emmett.esdb.sample:latest
56+
57+
- name: Image digest
58+
run: echo ${{ steps.docker_build.outputs.digest }}

0 commit comments

Comments
 (0)