2022-11-21 13:11:28 -05:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '**/README.md'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
haveno-ts-e2e:
|
2022-12-20 18:28:58 -05:00
|
|
|
timeout-minutes: 60
|
2022-11-21 13:11:28 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Stop Mono service
|
|
|
|
run: sudo killall mono
|
|
|
|
|
|
|
|
- name: Start containers
|
|
|
|
run: docker-compose -f "./docker/docker-compose.yml" up -d --build
|
|
|
|
|
|
|
|
- name: Install node
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
|
|
|
|
- name: Install protoc-gen-grpc-web
|
|
|
|
run: |
|
|
|
|
curl -Lo protoc-gen-grpc-web https://github.com/grpc/grpc-web/releases/download/1.4.2/protoc-gen-grpc-web-1.4.2-linux-x86_64
|
|
|
|
sudo mv protoc-gen-grpc-web /usr/local/bin
|
|
|
|
sudo chmod a+x /usr/local/bin/protoc-gen-grpc-web
|
|
|
|
protoc-gen-grpc-web --version
|
|
|
|
|
|
|
|
- name: Install protoc
|
|
|
|
run: |
|
|
|
|
curl -Lo protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protoc-3.20.1-linux-x86_64.zip
|
|
|
|
sudo unzip -q protoc.zip bin/protoc -d /usr/local
|
|
|
|
sudo chmod a+x /usr/local/bin/protoc
|
|
|
|
rm -rf protoc.zip
|
|
|
|
protoc --version
|
|
|
|
|
|
|
|
- name: Copy compiled haveno project from node2 container
|
|
|
|
run: |
|
|
|
|
sudo docker cp node2:/home/haveno/haveno ./../
|
|
|
|
sudo chmod 777 -R ./../haveno
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Run tests
|
2023-02-13 07:09:52 -05:00
|
|
|
run: npm run test -- --baseCurrencyNetwork=XMR_LOCAL -t "(?:^|\W)CI(?:$|\W)"
|
2022-11-21 13:11:28 -05:00
|
|
|
|
|
|
|
- name: Stop containers
|
|
|
|
if: always()
|
|
|
|
run: docker-compose -f "./docker/docker-compose.yml" down
|