Skip to content

Move IoT Safe code examples to at_chops #826

Move IoT Safe code examples to at_chops

Move IoT Safe code examples to at_chops #826

Workflow file for this run

# This workflows runs when
# 1. pull_request raised to trunk branch.
# 2. tag created on at_tools repository
name: at_libraries
on:
push:
tags:
- 'v*.*.*'
branches:
- trunk
pull_request:
branches:
- trunk
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- at_contact
- at_server_status
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f # v1.4
with:
sdk: stable
- name: Install dependencies in ${{ matrix.package }}
working-directory: packages/${{ matrix.package }}
run: dart pub get
- name: Analyze project source in ${{ matrix.package }}
working-directory: packages/${{ matrix.package }}
run: dart analyze
at_lookup_build_and_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- at_lookup
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f # v1.4
with:
sdk: stable
- name: Install dependencies in ${{ matrix.package }}
working-directory: packages/${{ matrix.package }}
run: dart pub get
- name: Analyze project source in ${{ matrix.package }}
working-directory: packages/${{ matrix.package }}
run: dart analyze
- name: run tests
working-directory: packages/${{ matrix.package }}
run: dart test --concurrency=1
at_chops_build_and_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- at_chops
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 # v1.4
with:
sdk: stable
- name: Install dependencies in ${{ matrix.package }}
working-directory: packages/${{ matrix.package }}
run: dart pub get
- name: Analyze project source in ${{ matrix.package }}
working-directory: packages/${{ matrix.package }}
run: dart analyze
- name: run tests
working-directory: packages/${{ matrix.package }}
run: dart test --concurrency=1
at_onboarding_cli_build_and_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- at_onboarding_cli
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 # v1.4
with:
sdk: stable
- name: Install dependencies in ${{ matrix.package }}
working-directory: packages/${{ matrix.package }}
run: dart pub get
- name: Analyze project source in ${{ matrix.package }}
working-directory: packages/${{ matrix.package }}
run: dart analyze
- name: run tests
working-directory: packages/${{ matrix.package }}
run: dart test --concurrency=1
functional_tests_at_onboarding_cli:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- at_onboarding_cli_functional_tests
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 # v1.4
with:
sdk: stable
#functional tests for at_onboarding_cli
- name: add entry to hosts file
run: echo "127.0.0.1 vip.ve.atsign.zone" | sudo tee -a /etc/hosts
- name: Get functional test dependencies
working-directory: tests/${{ matrix.package }}
run: dart pub get
- name: Start docker instance
working-directory: tests/${{ matrix.package }}
run: sudo docker-compose up -d
- name: Check for docker container readiness
working-directory: tests/${{ matrix.package }}
run: dart run check_docker_readiness.dart
- name: run pkamLoad on docker-image
run: sudo docker exec at_onboarding_cli_functional_tests_virtualenv_1 supervisorctl start pkamLoad
- name: Check test environment readiness
working-directory: tests/${{ matrix.package }}
run: dart run check_test_env.dart
- name: run tests
working-directory: tests/${{ matrix.package }}
run: dart test --concurrency=1
- name: kill docker image
working-directory: tests/${{ matrix.package }}
run: sudo docker-compose down