-
Notifications
You must be signed in to change notification settings - Fork 18
35 lines (31 loc) · 1006 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
name: CI for PRs
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
ci-build:
name: Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout PR Branch/Tree
uses: actions/checkout@v2
- name: Configure Git
run: |
git config --global user.email "[email protected]" && \
git config --global user.name "$GITHUB_ACTOR"
- name: Merge Changes in main Into PR Branch
run: git fetch origin && git checkout $GITHUB_HEAD_REF && git merge origin/$GITHUB_BASE_REF
- name: Build Test Image
id: docker_build
uses: docker/build-push-action@v2
with:
file: Dockerfile.ci
push: false
tags: app-test-image:latest
- name: Check Installed Dependencies in Image
run: |
docker run --rm \
--entrypoint sh \
-w /workspace \
${{ steps.docker_build.outputs.digest }} -c "yarn lint && yarn test"