Skip to content

Merge pull request #36 from cryptogarageinc/feature/add-pegout-tx-script #142

Merge pull request #36 from cryptogarageinc/feature/add-pegout-tx-script

Merge pull request #36 from cryptogarageinc/feature/add-pegout-tx-script #142

name: master and develop check
on:
push:
branches:
- master
- develop
- ci_test
paths-ignore:
- 'src/consoleCli.js'
- 'src/debugCli.js'
pull_request:
branches:
- master
- develop
env:
GITHUB_VERSION: v0.2.5
GITHUB_BITCOIN_VERSION: v0.2.5
GITHUB_DOCKER_IMAGE: ghcr.io/cryptogarageinc/elements-testing
ENTRYPOINT_PATH: /github/workspace/.github/workflows/docker/test_entrypoint.sh
BITCOIN_ENTRYPOINT_PATH: /github/workspace/.github/workflows/docker/test_bitcoin_entrypoint.sh
jobs:
elements-e2e-test:
name: elements e2e test
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- name: checkout
uses: actions/checkout@v3
- name: Login GitHub Registry
run: docker login docker.pkg.github.com -u owner -p ${{ secrets.GITHUB_TOKEN }}
- name: Pull image from GitHub Registry
run: docker pull ${{ env.GITHUB_DOCKER_IMAGE }}:${{ env.GITHUB_VERSION }}
- name: init directory
run: |
mkdir node_modules
chmod 777 node_modules
- name: cache node modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-${{ env.GITHUB_VERSION }}-${{ hashFiles('package-lock.json') }}
- name: npm install
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm install
- name: integration test
run: |
docker run -u root -v ${{ github.workspace }}:/github/workspace --entrypoint ${{ env.ENTRYPOINT_PATH }} ${{ env.GITHUB_DOCKER_IMAGE }}:${{ env.GITHUB_VERSION }}
bitcoin-e2e-test:
name: bitcoin e2e test
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- name: checkout
uses: actions/checkout@v3
- name: Login GitHub Registry
run: docker login docker.pkg.github.com -u owner -p ${{ secrets.GITHUB_TOKEN }}
- name: Pull image from GitHub Registry
run: docker pull ${{ env.GITHUB_DOCKER_IMAGE }}:${{ env.GITHUB_BITCOIN_VERSION }}
- name: init directory
run: |
mkdir node_modules
chmod 777 node_modules
- name: cache node modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-${{ env.GITHUB_BITCOIN_VERSION }}-${{ hashFiles('package-lock.json') }}
- name: npm install
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm install
- name: integration test
run: |
docker run -u root -v ${{ github.workspace }}:/github/workspace --entrypoint ${{ env.BITCOIN_ENTRYPOINT_PATH }} ${{ env.GITHUB_DOCKER_IMAGE }}:${{ env.GITHUB_BITCOIN_VERSION }}