chore: migrate .github/workflows/publish.yaml from PAT to GitHub App auth #9045
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: AEA framework sanity checks and tests | |
| on: pull_request | |
| jobs: | |
| python_checks: | |
| continue-on-error: False | |
| runs-on: '${{ matrix.os }}' | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| python-version: | |
| - '3.8' | |
| tox-job: | |
| - check_plugins_code_consistency | |
| - check_go_code_consistency | |
| - bandit | |
| - safety | |
| - black-check | |
| - isort-check | |
| - flake8 | |
| - vulture | |
| - mypy | |
| - pylint | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: '${{ matrix.python-version }}' | |
| - name: Install dependencies | |
| run: pip install tox==3.25.1 | |
| - name: 'Run check ${{ matrix.tox-job }}' | |
| run: | | |
| tox -e ${{ matrix.tox-job }} | |
| go_checks: | |
| continue-on-error: False | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: "^1.17.0" | |
| - name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get install libmbedtls-dev | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| - name: Golang code style check (libp2p_node) | |
| uses: golangci/golangci-lint-action@v3.1.0 | |
| env: | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
| with: | |
| version: v1.48.0 | |
| working-directory: libs/go/libp2p_node | |
| - name: Golang code style check (aealite) | |
| uses: golangci/golangci-lint-action@v3.1.0 | |
| env: | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
| with: | |
| version: v1.48.0 | |
| working-directory: libs/go/aealite | |
| misc_checks: | |
| runs-on: ubuntu-latest | |
| continue-on-error: False | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: | |
| python-version: | |
| - '3.8' | |
| tox-job: | |
| - liccheck | |
| - copyright_check | |
| - hash_check -- --timeout 40.0 | |
| - package_version_checks | |
| - package_dependencies_checks | |
| - check_generate_all_protocols | |
| - docs | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: '${{ matrix.python-version }}' | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: "^1.17.0" | |
| - name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get install libmbedtls-dev | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| pip install --user --upgrade setuptools | |
| # install Protobuf compiler | |
| wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip | |
| unzip protoc-3.19.4-linux-x86_64.zip -d protoc | |
| sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| # install IPFS | |
| sudo apt-get install -y wget | |
| wget -O ./go-ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz | |
| tar xvfz go-ipfs.tar.gz | |
| sudo mv go-ipfs/ipfs /usr/local/bin/ipfs | |
| ipfs init | |
| make protolint_install | |
| - name: Install dependencies | |
| run: pip install tox==3.25.1 | |
| - name: 'Run check ${{ matrix.tox-job }}' | |
| run: | | |
| tox -e ${{ matrix.tox-job }} | |
| misc_checks_extra: | |
| continue-on-error: False | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: "^1.17.0" | |
| - name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get install libmbedtls-dev | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| pip install tox | |
| - name: Check copyright year is up to date | |
| run: | | |
| ./scripts/bump_year.sh $(date +%Y) | |
| git diff --quiet||(echo "Some files have the incorrect year in their copyright header. Run ./scripts/bump_year.sh!"; exit 1) | |
| echo "all good" | |
| docs_check: | |
| continue-on-error: False | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - uses: actions/setup-node@v1 | |
| with: | |
| node-version: 12.x | |
| - name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get install libmbedtls-dev | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| pip install tox | |
| - name: Install markdown-spellcheck | |
| run: sudo npm install -g markdown-spellcheck | |
| - name: Check Docs links | |
| run: tox -e check-doc-links | |
| - name: Check API Docs updated | |
| run: tox -e check_api_docs | |
| - name: Check spelling | |
| run: tox -e spell_check | |
| plugins_install: | |
| continue-on-error: False | |
| runs-on: ${{ matrix.sys.os }} | |
| strategy: | |
| matrix: | |
| sys: | |
| - { os: windows-latest, shell: "msys2 {0}" } | |
| - { os: ubuntu-latest, shell: bash } | |
| - { os: macos-latest, shell: bash } | |
| python_version: [3.8] | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - if: matrix.sys.os == 'windows-latest' | |
| uses: msys2/setup-msys2@v2 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - if: matrix.os == 'ubuntu-latest' | |
| name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get install libmbedtls-dev | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| - name: Install tox | |
| run: | | |
| pip install tox==3.28.0 | |
| - name: Check plugin aea-ledger-cosmos | |
| run: | | |
| tox -r -e plugins_env -- sh -c "pip install ./plugins/aea-ledger-cosmos && aea generate-key cosmos && echo aea-ledger-cosmos checked!" | |
| - name: Check plugin aea-ledger-ethereum | |
| run: | | |
| tox -r -e plugins_env -- sh -c "pip install ./plugins/aea-ledger-ethereum && aea generate-key ethereum && echo aea-ledger-ethereum checked!" | |
| - name: Check plugin aea-ledger-fetchai | |
| run: | | |
| tox -r -e plugins_env -- sh -c "pip install ./plugins/aea-ledger-fetchai && aea generate-key fetchai && echo aea-ledger-fetchai checked!" | |
| - name: Check plugin aea-cli-ipfs | |
| run: | | |
| tox -r -e plugins_env -- sh -c "pip install ./plugins/aea-cli-ipfs && aea ipfs --help && echo aea-cli-ipfs checked!" | |
| protolint: | |
| continue-on-error: False | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: "^1.17.0" | |
| - name: Install protolint (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| make protolint_install | |
| - name: Protolint check | |
| run: | | |
| make protolint | |
| integration_tests: | |
| if: github.base_ref == 'main' | |
| continue-on-error: True | |
| needs: | |
| - python_checks | |
| - go_checks | |
| - misc_checks | |
| - misc_checks_extra | |
| - plugins_install | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: "^1.17.0" | |
| - name: Setup GCloud - production | |
| uses: google-github-actions/setup-gcloud@v0 | |
| with: | |
| project_id: ${{ secrets.GCLOUD_FETCH_AI_PROD_PROJECT }} | |
| service_account_key: ${{ secrets.GCLOUD_FETCH_AI_PROD_KEY }} | |
| - name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get install libmbedtls-dev | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| pip install tox | |
| # install Protobuf compiler | |
| wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip | |
| unzip protoc-3.19.4-linux-x86_64.zip -d protoc | |
| sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| - name: Configure Docker | |
| run: | | |
| gcloud auth configure-docker | |
| - name: Pull SOEF Image | |
| run: | | |
| docker pull gcr.io/fetch-ai-images/soef:9e78611 # change this to latest tag | |
| - name: Pull fetchd | |
| run: | | |
| docker pull fetchai/fetchd:0.10.2 | |
| - name: Pull ganache | |
| run: | | |
| docker pull trufflesuite/ganache-cli:latest | |
| - name: Async integration tests | |
| run: tox -e py3.8 -- -m 'integration and not unstable and not ledger' ./tests --ignore=tests/test_aea_core_packages | |
| core_packages_tests: | |
| # tests intersection with ledger and integration | |
| # limited tests set for quick checking primary functionality of the AEA | |
| continue-on-error: True | |
| needs: | |
| - python_checks | |
| - go_checks | |
| - misc_checks | |
| - misc_checks_extra | |
| - plugins_install | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: "^1.17.0" | |
| - name: Setup GCloud - production | |
| uses: google-github-actions/setup-gcloud@v0 | |
| with: | |
| project_id: ${{ secrets.GCLOUD_FETCH_AI_PROD_PROJECT }} | |
| service_account_key: ${{ secrets.GCLOUD_FETCH_AI_PROD_KEY }} | |
| - name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get install libmbedtls-dev | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| pip install tox | |
| # install Protobuf compiler | |
| wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip | |
| unzip protoc-3.19.4-linux-x86_64.zip -d protoc | |
| sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| - name: Configure Docker | |
| run: | | |
| gcloud auth configure-docker | |
| - name: Pull SOEF Image | |
| run: | | |
| docker pull gcr.io/fetch-ai-images/soef:9e78611 # change this to latest tag | |
| - name: Pull fetchd | |
| run: | | |
| docker pull fetchai/fetchd:0.10.2 | |
| - name: Pull ganache | |
| run: | | |
| docker pull trufflesuite/ganache-cli:latest | |
| - name: Async integration tests | |
| run: tox -e py3.8 -- tests/test_aea_core_packages/ | |
| integration_ledger_tests: | |
| if: github.base_ref == 'main' | |
| continue-on-error: True | |
| needs: | |
| - python_checks | |
| - go_checks | |
| - misc_checks | |
| - misc_checks_extra | |
| - plugins_install | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - name: Setup GCloud - production | |
| uses: google-github-actions/setup-gcloud@v0 | |
| with: | |
| project_id: ${{ secrets.GCLOUD_FETCH_AI_PROD_PROJECT }} | |
| service_account_key: ${{ secrets.GCLOUD_FETCH_AI_PROD_KEY }} | |
| - name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| pip install tox | |
| - name: Configure Docker | |
| run: | | |
| gcloud auth configure-docker | |
| - name: Pull SOEF Image | |
| run: | | |
| docker pull gcr.io/fetch-ai-images/soef:9e78611 # change this to latest tag | |
| - name: Integration tests | |
| run: tox -e py3.8 -- -m 'integration and not unstable and ledger' ./tests --ignore=tests/test_aea_core_packages | |
| aea-tests: | |
| continue-on-error: True | |
| needs: | |
| - python_checks | |
| - go_checks | |
| - misc_checks | |
| - misc_checks_extra | |
| - plugins_install | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python_version: [3.8, 3.9, "3.10"] | |
| timeout-minutes: 90 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: "^1.17.0" | |
| - if: matrix.os == 'ubuntu-latest' | |
| name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get install libmbedtls-dev | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| pip install tox | |
| # install Protobuf compiler | |
| wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip | |
| unzip protoc-3.19.4-linux-x86_64.zip -d protoc | |
| sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| make protolint_install | |
| # sudo apt-get install -y protobuf-compiler | |
| # use sudo rm /var/lib/apt/lists/lock above in line above update if dependency install failures persist | |
| # use sudo apt-get dist-upgrade above in line below update if dependency install failures persist | |
| - if: matrix.os == 'macos-latest' | |
| name: Install dependencies (macos-latest) | |
| run: | | |
| pip install tox | |
| brew install gcc | |
| # brew install protobuf | |
| # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb | |
| wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-osx-x86_64.zip | |
| unzip protoc-3.19.4-osx-x86_64.zip -d protoc | |
| sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| brew tap yoheimuta/protolint | |
| brew install protolint | |
| - if: matrix.os == 'windows-latest' | |
| name: Install dependencies (windows-latest) | |
| env: | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
| run: | | |
| python -m pip install -U pip | |
| echo "::add-path::C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64" | |
| choco install protoc --version 3.19.4 | |
| choco install mingw -y | |
| choco install make -y | |
| # to check make was installed | |
| make --version | |
| pip install tox | |
| # wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-win64.zip | |
| # unzip protoc-3.19.4-win64.zip -d protoc | |
| # sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| python scripts/update_symlinks_cross_platform.py | |
| make protolint_install_win | |
| # just check protolint runs | |
| protolint version | |
| - if: True | |
| name: Unit tests | |
| run: | | |
| tox -e py${{ matrix.python_version }} -- -m 'not integration and not unstable and not ledger' ./tests/test_docs ./tests/test_aea | |
| - name: Plugin tests | |
| run: | | |
| tox -e plugins-py${{ matrix.python_version }} -- -m 'not integration and not unstable' | |
| examples-tests: | |
| if: github.base_ref == 'main' | |
| continue-on-error: True | |
| needs: | |
| - python_checks | |
| - go_checks | |
| - misc_checks | |
| - misc_checks_extra | |
| - plugins_install | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: "^1.17.0" | |
| - name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| pip install tox | |
| - name: Unit tests | |
| run: tox -e py3.8 -- tests/test_examples | |
| aea-extras-tests: | |
| continue-on-error: True | |
| needs: | |
| - python_checks | |
| - go_checks | |
| - misc_checks | |
| - misc_checks_extra | |
| - plugins_install | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python_version: [3.8, 3.9, "3.10"] | |
| timeout-minutes: 90 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: "^1.17.0" | |
| - if: matrix.os == 'ubuntu-latest' | |
| name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get install libmbedtls-dev | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| pip install tox | |
| # install Protobuf compiler | |
| wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip | |
| unzip protoc-3.19.4-linux-x86_64.zip -d protoc | |
| sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| make protolint_install | |
| # sudo apt-get install -y protobuf-compiler | |
| # use sudo rm /var/lib/apt/lists/lock above in line above update if dependency install failures persist | |
| # use sudo apt-get dist-upgrade above in line below update if dependency install failures persist | |
| - if: matrix.os == 'macos-latest' | |
| name: Install dependencies (macos-latest) | |
| run: | | |
| pip install tox | |
| brew install gcc | |
| # brew install protobuf | |
| # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb | |
| wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-osx-x86_64.zip | |
| unzip protoc-3.19.4-osx-x86_64.zip -d protoc | |
| sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| brew tap yoheimuta/protolint | |
| brew install protolint | |
| - if: matrix.os == 'windows-latest' | |
| name: Install dependencies (windows-latest) | |
| env: | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
| run: | | |
| python -m pip install -U pip | |
| echo "::add-path::C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64" | |
| choco install protoc --version 3.19.4 | |
| choco install mingw -y | |
| choco install make -y | |
| # to check make was installed | |
| make --version | |
| pip install tox | |
| # wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-win64.zip | |
| # unzip protoc-3.19.4-win64.zip -d protoc | |
| # sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| python scripts/update_symlinks_cross_platform.py | |
| make protolint_install_win | |
| # just check protolint runs | |
| protolint version | |
| - name: Unit tests | |
| run: | | |
| tox -e py${{ matrix.python_version }} -- ./tests/test_aea_extra | |
| packages-tests: | |
| if: github.base_ref == 'main' | |
| continue-on-error: True | |
| needs: | |
| - python_checks | |
| - go_checks | |
| - misc_checks | |
| - misc_checks_extra | |
| - plugins_install | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python_version: [3.8, 3.9, "3.10"] | |
| timeout-minutes: 90 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: "^1.17.0" | |
| - if: matrix.os == 'ubuntu-latest' | |
| name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get install libmbedtls-dev | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| pip install tox | |
| # install Protobuf compiler | |
| wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip | |
| unzip protoc-3.19.4-linux-x86_64.zip -d protoc | |
| sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| make protolint_install | |
| # sudo apt-get install -y protobuf-compiler | |
| # use sudo rm /var/lib/apt/lists/lock above in line above update if dependency install failures persist | |
| # use sudo apt-get dist-upgrade above in line below update if dependency install failures persist | |
| - if: matrix.os == 'macos-latest' | |
| name: Install dependencies (macos-latest) | |
| run: | | |
| pip install tox | |
| brew install gcc | |
| # brew install protobuf | |
| # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb | |
| wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-osx-x86_64.zip | |
| unzip protoc-3.19.4-osx-x86_64.zip -d protoc | |
| sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| brew tap yoheimuta/protolint | |
| brew install protolint | |
| - if: matrix.os == 'windows-latest' | |
| name: Install dependencies (windows-latest) | |
| env: | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
| run: | | |
| python -m pip install -U pip | |
| echo "::add-path::C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64" | |
| choco install protoc --version 3.19.4 | |
| choco install mingw -y | |
| choco install make -y | |
| # to check make was installed | |
| make --version | |
| pip install tox | |
| # wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-win64.zip | |
| # unzip protoc-3.19.4-win64.zip -d protoc | |
| # sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| python scripts/update_symlinks_cross_platform.py | |
| make protolint_install_win | |
| # just check protolint runs | |
| protolint version | |
| - if: True | |
| name: Unit tests | |
| run: | | |
| tox -e py${{ matrix.python_version }} -- --cov=packages/fetchai/connections --cov=packages/fetchai/contracts --cov=packages/fetchai/protocols --cov=packages/fetchai/skills -m 'not integration and not unstable' ./tests/test_packages_for_aea_tests ./tests/test_packages | |
| golang_tests: | |
| continue-on-error: True | |
| needs: | |
| - go_checks | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| - windows-latest | |
| python-version: [3.8] | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: "^1.17.0" | |
| - if: matrix.os == 'macos-latest' | |
| working-directory: ./libs/go/libp2p_node | |
| run: | | |
| export LINKPATH=`go env GOTOOLDIR`/link | |
| echo $LINKPATH | |
| sudo cp $LINKPATH ${LINKPATH}_orig | |
| sudo cp link $LINKPATH | |
| sudo chmod a+x $LINKPATH | |
| - if: matrix.python-version == '3.8' | |
| name: Golang unit tests (libp2p_node) | |
| working-directory: ./libs/go/libp2p_node | |
| run: make test | |
| - if: matrix.python-version == '3.8' | |
| name: Golang unit tests (aealite) | |
| working-directory: ./libs/go/aealite | |
| run: go test -p 1 -timeout 0 -count 1 -v ./... | |
| libp2p_coverage: | |
| name: libp2p_coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go 1.17 | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: 1.17 | |
| id: go | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v3 | |
| - name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get install libmbedtls-dev | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| sudo apt-get install make -y | |
| - name: Get dependencies | |
| working-directory: ./libs/go/libp2p_node/ | |
| run: | | |
| make install | |
| - name: Generate coverage report | |
| working-directory: ./libs/go/libp2p_node/ | |
| run: | | |
| make test | |
| - name: Print coverage report | |
| working-directory: ./libs/go/libp2p_node/ | |
| run: | | |
| go tool cover -func=coverage.txt | |
| coverage_checks: | |
| continue-on-error: True | |
| needs: | |
| - python_checks | |
| - go_checks | |
| - misc_checks | |
| - misc_checks_extra | |
| - docs_check | |
| - plugins_install | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.8 | |
| - uses: actions/setup-go@v3 | |
| with: | |
| go-version: "^1.17.0" | |
| - name: Install dependencies (ubuntu-latest) | |
| run: | | |
| sudo apt-get update --fix-missing | |
| sudo apt-get install libmbedtls-dev | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| pip install tox | |
| pip install coverage | |
| # install Protobuf compiler | |
| wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-linux-x86_64.zip | |
| unzip protoc-3.19.4-linux-x86_64.zip -d protoc | |
| sudo mv protoc/bin/protoc /usr/local/bin/protoc | |
| make protolint_install | |
| - name: Run all tests | |
| run: | | |
| tox -e py3.8-cov -- --ignore=tests/test_docs --ignore=tests/test_examples --ignore=tests/test_packages/test_skills_integration -m 'not unstable' ./tests | |
| tox -e plugins-py3.8-cov -- --cov-append -m 'not unstable' | |
| continue-on-error: true | |
| - name: Show full coverage report | |
| run: | | |
| coverage report -m -i | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false |