Fix set-env deprecation warnings (#478)
This commit is contained in:
parent
611b8c539d
commit
5fa9d21246
100
.github/workflows/main.yml
vendored
100
.github/workflows/main.yml
vendored
@ -19,9 +19,11 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- run: git submodule status > submodule.status
|
- name: Set cache key
|
||||||
- id: get_cache_key
|
id: get_cache_key
|
||||||
run: echo "::set-output name=cache_key::cache-repo-${{ hashFiles('yarn.lock', 'package.json', 'submodule.status') }}"
|
run: |
|
||||||
|
git submodule status > submodule.status
|
||||||
|
echo "::set-output name=cache_key::cache-repo-${{ hashFiles('yarn.lock', 'package.json', 'submodule.status') }}"
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
id: cache-repo
|
id: cache-repo
|
||||||
with:
|
with:
|
||||||
@ -29,7 +31,8 @@ jobs:
|
|||||||
**/node_modules
|
**/node_modules
|
||||||
contracts/build
|
contracts/build
|
||||||
key: ${{ steps.get_cache_key.outputs.cache_key }}
|
key: ${{ steps.get_cache_key.outputs.cache_key }}
|
||||||
- if: ${{ !steps.cache-repo.outputs.cache-hit }}
|
- name: Install dependencies and compile contracts
|
||||||
|
if: ${{ !steps.cache-repo.outputs.cache-hit }}
|
||||||
run: |
|
run: |
|
||||||
yarn install --frozen-lockfile
|
yarn install --frozen-lockfile
|
||||||
yarn run install:deploy
|
yarn run install:deploy
|
||||||
@ -56,7 +59,8 @@ jobs:
|
|||||||
**/node_modules
|
**/node_modules
|
||||||
contracts/build
|
contracts/build
|
||||||
key: ${{ needs.initialize.outputs.cache_key }}
|
key: ${{ needs.initialize.outputs.cache_key }}
|
||||||
- run: ${{ steps.cache-repo.outputs.cache-hit }} && yarn run ${{ matrix.task }}
|
- name: yarn run ${{ matrix.task }}
|
||||||
|
run: ${{ steps.cache-repo.outputs.cache-hit }} && yarn run ${{ matrix.task }}
|
||||||
ui-coverage:
|
ui-coverage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
@ -76,7 +80,8 @@ jobs:
|
|||||||
**/node_modules
|
**/node_modules
|
||||||
contracts/build
|
contracts/build
|
||||||
key: ${{ needs.initialize.outputs.cache_key }}
|
key: ${{ needs.initialize.outputs.cache_key }}
|
||||||
- run: ${{ steps.cache-repo.outputs.cache-hit }} && yarn workspace ui run coverage
|
- name: yarn workspace ui run coverage
|
||||||
|
run: ${{ steps.cache-repo.outputs.cache-hit }} && yarn workspace ui run coverage
|
||||||
- uses: coverallsapp/github-action@master
|
- uses: coverallsapp/github-action@master
|
||||||
with:
|
with:
|
||||||
github-token: ${{ github.token }}
|
github-token: ${{ github.token }}
|
||||||
@ -87,14 +92,16 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- run: |
|
- name: Evaluate e2e docker images tags
|
||||||
|
run: |
|
||||||
git submodule status > submodule.status
|
git submodule status > submodule.status
|
||||||
echo "::set-env name=E2E_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'Dockerfile.e2e', 'commons', 'oracle-e2e', 'monitor-e2e') }}"
|
echo "E2E_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'Dockerfile.e2e', 'commons', 'oracle-e2e', 'monitor-e2e') }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=ORACLE_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'oracle') }}"
|
echo "ORACLE_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'oracle') }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=MONITOR_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'monitor') }}"
|
echo "MONITOR_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'monitor') }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=UI_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'ui') }}"
|
echo "UI_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'ui') }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=ALM_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'alm') }}"
|
echo "ALM_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'alm') }}" >> $GITHUB_ENV
|
||||||
- run: |
|
- name: Rebuild and push updated images
|
||||||
|
run: |
|
||||||
function check_if_image_exists() {
|
function check_if_image_exists() {
|
||||||
curl -fsSlL -H 'Authorization: bearer ${{ github.token }}' "https://${DOCKER_REGISTRY}/v2/${DOCKER_REPO}/tokenbridge-e2e-$1/manifests/$2" > /dev/null
|
curl -fsSlL -H 'Authorization: bearer ${{ github.token }}' "https://${DOCKER_REGISTRY}/v2/${DOCKER_REPO}/tokenbridge-e2e-$1/manifests/$2" > /dev/null
|
||||||
}
|
}
|
||||||
@ -119,8 +126,10 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- run: echo "::set-env name=MOLECULE_RUNNER_TAG::${{ hashFiles('./deployment-e2e/Dockerfile') }}"
|
- name: Evaluate e2e molecule runner tag
|
||||||
- run: |
|
run: echo "MOLECULE_RUNNER_TAG=${{ hashFiles('./deployment-e2e/Dockerfile') }}" >> $GITHUB_ENV
|
||||||
|
- name: Rebuild and push molecule runner e2e image
|
||||||
|
run: |
|
||||||
function check_if_image_exists() {
|
function check_if_image_exists() {
|
||||||
curl -fsSlL -H 'Authorization: bearer ${{ github.token }}' "https://${DOCKER_REGISTRY}/v2/${DOCKER_REPO}/tokenbridge-e2e-$1/manifests/$2" > /dev/null
|
curl -fsSlL -H 'Authorization: bearer ${{ github.token }}' "https://${DOCKER_REGISTRY}/v2/${DOCKER_REPO}/tokenbridge-e2e-$1/manifests/$2" > /dev/null
|
||||||
}
|
}
|
||||||
@ -150,13 +159,14 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- run: |
|
- name: Evaluate e2e docker images tags
|
||||||
|
run: |
|
||||||
git submodule status > submodule.status
|
git submodule status > submodule.status
|
||||||
echo "::set-env name=E2E_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'Dockerfile.e2e', 'commons', 'oracle-e2e', 'monitor-e2e') }}"
|
echo "E2E_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'Dockerfile.e2e', 'commons', 'oracle-e2e', 'monitor-e2e') }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=ORACLE_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'oracle') }}"
|
echo "ORACLE_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'oracle') }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=MONITOR_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'monitor') }}"
|
echo "MONITOR_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'monitor') }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=UI_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'ui') }}"
|
echo "UI_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'ui') }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=ALM_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'alm') }}"
|
echo "ALM_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'alm') }}" >> $GITHUB_ENV
|
||||||
- if: ${{ matrix.use-cache }}
|
- if: ${{ matrix.use-cache }}
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
id: cache-repo
|
id: cache-repo
|
||||||
@ -165,8 +175,10 @@ jobs:
|
|||||||
**/node_modules
|
**/node_modules
|
||||||
contracts/build
|
contracts/build
|
||||||
key: ${{ needs.initialize.outputs.cache_key }}
|
key: ${{ needs.initialize.outputs.cache_key }}
|
||||||
- run: docker login ${DOCKER_REGISTRY} -u ${{ github.actor }} -p ${{ github.token }}
|
- name: Login to docker registry
|
||||||
- run: ${{ !matrix.use-cache || steps.cache-repo.outputs.cache-hit }} && yarn run ${{ matrix.task }}
|
run: docker login ${DOCKER_REGISTRY} -u ${{ github.actor }} -p ${{ github.token }}
|
||||||
|
- name: yarn run ${{ matrix.task }}
|
||||||
|
run: ${{ !matrix.use-cache || steps.cache-repo.outputs.cache-hit }} && yarn run ${{ matrix.task }}
|
||||||
deployment:
|
deployment:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
@ -179,8 +191,10 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- run: echo "::set-env name=MOLECULE_RUNNER_TAG::${{ hashFiles('./deployment-e2e/Dockerfile') }}"
|
- name: Evaluate e2e molecule runner tag
|
||||||
- run: docker login ${DOCKER_REGISTRY} -u ${{ github.actor }} -p ${{ github.token }}
|
run: echo "MOLECULE_RUNNER_TAG=${{ hashFiles('./deployment-e2e/Dockerfile') }}" >> $GITHUB_ENV
|
||||||
|
- name: Login to docker registry
|
||||||
|
run: docker login ${DOCKER_REGISTRY} -u ${{ github.actor }} -p ${{ github.token }}
|
||||||
- run: deployment-e2e/molecule.sh ${{ matrix.task }}
|
- run: deployment-e2e/molecule.sh ${{ matrix.task }}
|
||||||
ultimate:
|
ultimate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -205,14 +219,15 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- run: |
|
- name: Evaluate e2e docker images tags
|
||||||
|
run: |
|
||||||
git submodule status > submodule.status
|
git submodule status > submodule.status
|
||||||
echo "::set-env name=E2E_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'Dockerfile.e2e', 'commons', 'oracle-e2e', 'monitor-e2e') }}"
|
echo "E2E_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'Dockerfile.e2e', 'commons', 'oracle-e2e', 'monitor-e2e') }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=ORACLE_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'oracle') }}"
|
echo "ORACLE_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'oracle') }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=MONITOR_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'monitor') }}"
|
echo "MONITOR_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'monitor') }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=UI_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'ui') }}"
|
echo "UI_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'ui') }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=ALM_TAG::${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'alm') }}"
|
echo "ALM_TAG=${{ hashFiles('yarn.lock', 'package.json', 'submodule.status', 'commons', 'alm') }}" >> $GITHUB_ENV
|
||||||
echo "::set-env name=MOLECULE_RUNNER_TAG::${{ hashFiles('./deployment-e2e/Dockerfile') }}"
|
echo "MOLECULE_RUNNER_TAG=${{ hashFiles('./deployment-e2e/Dockerfile') }}" >> $GITHUB_ENV
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
id: cache-repo
|
id: cache-repo
|
||||||
with:
|
with:
|
||||||
@ -220,12 +235,19 @@ jobs:
|
|||||||
**/node_modules
|
**/node_modules
|
||||||
contracts/build
|
contracts/build
|
||||||
key: ${{ needs.initialize.outputs.cache_key }}
|
key: ${{ needs.initialize.outputs.cache_key }}
|
||||||
- run: docker login ${DOCKER_REGISTRY} -u ${{ github.actor }} -p ${{ github.token }}
|
- name: Login to docker registry
|
||||||
- run: ${{ steps.cache-repo.outputs.cache-hit }} && e2e-commons/up.sh deploy blocks
|
run: docker login ${DOCKER_REGISTRY} -u ${{ github.actor }} -p ${{ github.token }}
|
||||||
- run: docker-compose -f ./e2e-commons/docker-compose.yml pull oracle
|
- name: Deploy contracts
|
||||||
- run: deployment-e2e/molecule.sh ultimate-${{ matrix.task }}
|
run: ${{ steps.cache-repo.outputs.cache-hit }} && e2e-commons/up.sh deploy blocks
|
||||||
- run: sudo chown -R $USER:docker /var/run/docker.sock
|
- name: Pull e2e oracle image
|
||||||
- if: ${{ matrix.ui-e2e-grep }}
|
run: docker-compose -f ./e2e-commons/docker-compose.yml pull oracle
|
||||||
|
- name: Deploy oracle and ui
|
||||||
|
run: deployment-e2e/molecule.sh ultimate-${{ matrix.task }}
|
||||||
|
- name: Reset docker socket permissions
|
||||||
|
run: sudo chown -R $USER:docker /var/run/docker.sock
|
||||||
|
- name: Run ui e2e tests
|
||||||
|
if: ${{ matrix.ui-e2e-grep }}
|
||||||
run: cd ui-e2e && xvfb-run yarn mocha -g "${{ matrix.ui-e2e-grep }}" -b ./test.js
|
run: cd ui-e2e && xvfb-run yarn mocha -g "${{ matrix.ui-e2e-grep }}" -b ./test.js
|
||||||
- if: ${{ !matrix.ui-e2e-grep }}
|
- name: Run oracle e2e tests
|
||||||
|
if: ${{ !matrix.ui-e2e-grep }}
|
||||||
run: docker-compose -f ./e2e-commons/docker-compose.yml run e2e yarn workspace oracle-e2e run ${{ matrix.task }}
|
run: docker-compose -f ./e2e-commons/docker-compose.yml run e2e yarn workspace oracle-e2e run ${{ matrix.task }}
|
||||||
|
Loading…
Reference in New Issue
Block a user