-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (58 loc) · 1.88 KB
/
test.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Build
on:
push:
workflow_dispatch:
env:
PGUSER: postgres
PGPASSWORD: postgres
PGDATABASE: postgres
PGHOST: localhost
POSTGRES_REP_USER: reptest
POSTGRES_REP_PASSWORD: reptest
PACT_BROKER_BASE_URL: http://0.0.0.0:8000
PACT_BROKER_USERNAME: pact_workshop
PACT_BROKER_PASSWORD: pact_workshop
jobs:
test:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# - name: "Installing Pact CLI Tools"
# run: |
# echo "Installing Pact CLI Tools"
# echo "=> downloading Pact CLI Tools"
# os='linux-x86_64'
# tag=$(basename $(curl -fs -o/dev/null -w %{redirect_url} https://github.com/pact-foundation/pact-ruby-standalone/releases/latest))
# filename="pact-${tag#v}-${os}.tar.gz"
# standalone_download_path=https://github.com/pact-foundation/pact-ruby-standalone/releases/download/${tag}/${filename}
# echo "from ${standalone_download_path}"
# curl -LO ${standalone_download_path}
# tar xzf ${filename}
# rm ${filename}
# echo "PATH=${PATH}:${PWD}/pact/bin/" >> $GITHUB_ENV
# - run: pact help
- name: Start OSS Pact Broker
run: docker-compose up -d
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- run: npm install
working-directory: consumer
- run: npm run test:consumer
working-directory: consumer
- run: npm run pact:publish
working-directory: consumer
- run: composer install
working-directory: provider
- run: php -S localhost:8000 &
working-directory: provider
- run: vendor/bin/phpunit
working-directory: provider
- name: Stop docker
if: always()
run: docker-compose down