-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.34 KB
/
pull-request.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
name: CI
on:
workflow_dispatch: {}
pull_request: {}
push:
branches:
- main
# When a new revision is pushed to a PR, cancel all in-progress CI runs for that
# PR. See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
examples:
name: build examples
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
pkg:
- opa-react-demo
- nestjs-demo
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 22
- name: build and start
run: docker compose up --build -d
working-directory: ${{ matrix.pkg }}
- name: integration tests
run: docker compose run --quiet-pull integration-tests
working-directory: ${{ matrix.pkg }}
if: matrix.pkg == 'nestjs-demo'
- name: dump logs
run: docker compose logs
if: failure()
working-directory: ${{ matrix.pkg }}
- name: build and start
run: docker compose down
working-directory: ${{ matrix.pkg }}