Skip to content

Oxford2 (#2771)

Oxford2 (#2771) #1

Workflow file for this run

name: Node.js CI
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
lint-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node:
- 'lts/hydrogen'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run build
- run: npm run lint
- run: npm run build-docs
- run: npm run test -- --runInBand
- name: Codecov
uses: codecov/codecov-action@v3.1.1
with:
file: .coverage/*.json
env:
CI: true
RUN_INTEGRATION: true
integration-tests-testnet:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
include:
- testnet: oxfordnet
testnet_uppercase: OXFORDNET
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/hydrogen
- run: npm ci
- run: npm run build
- if: ${{ !github.event.pull_request.head.repo.fork }}
name: Tailscale
uses: tailscale/github-action@v1
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
version: 1.32.2
- run: npm -w integration-tests run test:${{ matrix.testnet }} -- --maxWorkers=4
env:
# Ternary operator workaround
TEZOS_RPC_${{ matrix.testnet_uppercase }}: ${{ github.event.pull_request.head.repo.fork && format('https://{0}.ecadinfra.com', matrix.testnet) || null }}
# integration-tests-flextesa:
# runs-on: ubuntu-latest
# continue-on-error: true
# strategy:
# matrix:
# include:
# - protocol: Oxford
# testnet: oxfordnet
# testnet_uppercase: OXFORDNET
# flextesa_docker_image: oxheadalpha/flextesa:latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: lts/hydrogen
# ## The 4 Bootstrap Accounts (alias, pk, pkh, sk)
# # alice,edpkvGfYw3LyB1UcCahKQk4rF2tvbMUk8GFiTuMjL75uGXrpvKXhjn,tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb,unencrypted:edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq
# # bob,edpkurPsQ8eUApnLUJ9ZPDvu98E8VNj4KtJa1aZr16Cr5ow5VHKnz4,tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6,unencrypted:edsk3RFfvaFaxbHx8BMtEW1rKQcPtDML3LXjNqMNLCzC3wLC1bWbAt
# # charlie,edpkuvMuRuZ6ZbAquJH1XxBFfUmuBFz1zp9ENEqjCVgLp3NcY3Ww9M,tz1RDVcKmFcqzvTpJirvg4JaUVgZbjtnRT26,unencrypted:edsk3RgWvbKKA1atEUcaGwivge7QtckHkTL9nQJUXQKY5r8WKp4pF4
# # donald,edpkvXGp1BMZxHkwg3mKnWfJYS6HTJ5JtufD8YXxLtH8UKqLZkZVun,tz1eSWp4B9s1qhtNMMNXAkaf2oqCnDHd2iAm,unencrypted:edsk3S8mG2sSBmSRbikAcZVLCz4SrCq4DjmsQRic6MGktqNFijfrS2
# - name: Generate Flextesa bootstrap accounts
# run: |-
# echo "alice=$(docker run --rm ${{ matrix.flextesa_docker_image }} flextesa key alice)" >> $GITHUB_ENV
# echo "bob=$(docker run --rm ${{ matrix.flextesa_docker_image }} flextesa key bob)" >> $GITHUB_ENV
# echo "charlie=$(docker run --rm ${{ matrix.flextesa_docker_image }} flextesa key charlie)" >> $GITHUB_ENV
# echo "donald=$(docker run --rm ${{ matrix.flextesa_docker_image }} flextesa key donald)" >> $GITHUB_ENV
# - name: Provision Flextesa ${{ matrix.protocol }} container
# run: |-
# docker run \
# --rm \
# --name my-sandbox \
# --detach \
# -p 20000:20000 \
# ${{ matrix.flextesa_docker_image }} \
# flextesa mini-net \
# --root /tmp/mini-box --size 1 \
# --set-history-mode N000:archive \
# --number-of-b 1 \
# --balance-of-bootstrap-accounts tez:100_000_000 \
# --time-b 1 \
# --add-bootstrap-account="${alice}@2_000_000_000_000" \
# --add-bootstrap-account="${bob}@2_000_000_000_000" \
# --add-bootstrap-account="${charlie}@2_000_000_000_000" \
# --add-bootstrap-account="${donald}@2_000_000_000_000" \
# --no-daemons-for=donald \
# --until-level 200_000_000 \
# --protocol-kind ${{ matrix.protocol }}
# - run: npm ci
# - run: npm run build
# - run: npm -w integration-tests run originate-known-contracts && npm -w integration-tests run test:${{ matrix.testnet }}-secret-key -- --testPathIgnorePatterns ledger-signer-failing-tests.spec.ts ledger-signer.spec.ts contract-estimation-tests.spec.ts rpc-get-protocol-constants.spec.ts sandbox-ballot-operation.spec.ts contract-batch-high-number-of-operations.spec.ts contract-pair-as-key.spec.ts --detectOpenHandles --runInBand
# env:
# RUN_${{ matrix.testnet_uppercase }}_WITH_SECRET_KEY: true
# SECRET_KEY: edsk3S8mG2sSBmSRbikAcZVLCz4SrCq4DjmsQRic6MGktqNFijfrS2
# TEZOS_RPC_${{ matrix.testnet_uppercase }}: http://localhost:20000
# POLLING_INTERVAL_MILLISECONDS: 100
# RPC_CACHE_MILLISECONDS: 0
# TEZOS_BAKER: tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb
# - run: npm -w integration-tests run test:${{ matrix.testnet }}-secret-key sandbox-ballot-operation.spec.ts
# env:
# RUN_${{ matrix.testnet_uppercase }}_WITH_SECRET_KEY: true
# SECRET_KEY: edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq
# TEZOS_RPC_${{ matrix.testnet_uppercase }}: http://localhost:20000
# POLLING_INTERVAL_MILLISECONDS: 100
# RPC_CACHE_MILLISECONDS: 0
# TEZOS_BAKER: tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb