Skip to content

Commit

Permalink
ci(e2e): disable for now
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Jun 2, 2021
1 parent cfc3a93 commit 4f13a98
Showing 1 changed file with 1 addition and 162 deletions.
163 changes: 1 addition & 162 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,167 +182,6 @@ jobs:
app_update.bin
prj.conf
e2e:
name: End to End tests
runs-on: ubuntu-latest

needs: [broker, docker]

strategy:
matrix:
board: [nrf9160dk_nrf9160ns]
network: [ltem]

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
STACK_NAME: ${{ secrets.STACK_NAME }}
DEVICE_ID: ${{ secrets.DEVICE_ID }}
CI: 1
FORCE_COLOR: 3

steps:
- uses: actions/checkout@v2

- name: Generate Job ID
run: |
JOB_ID=`uuidgen`
echo "JOB_ID=${JOB_ID}" >> $GITHUB_ENV
- name: Configure Version
run: |
APP_VERSION=${{ github.sha }}-${{ matrix.board }}-${{ matrix.network }}-${JOB_ID}
echo "APP_VERSION=${APP_VERSION}" >> $GITHUB_ENV
echo "CONFIG_ASSET_TRACKER_V2_APP_VERSION=\"${APP_VERSION}-original\"" >> prj.conf
- run: echo "# Firmware CI settings" >> prj.conf

- name: Enable debug logs
run: echo "CONFIG_LOG_MAX_LEVEL=4" >> prj.conf

- name: Set network mode to LTE-m
run: |
sed -i s/CONFIG_LTE_NETWORK_MODE_NBIOT_GPS=y/CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y/ prj.conf
- uses: actions/download-artifact@v2
with:
name: broker

- name: Configure the AWS IoT broker hostname
run: |
BROKER_HOSTNAME=`cat broker.conf`
echo "BROKER_HOSTNAME=${BROKER_HOSTNAME}" >> $GITHUB_ENV
echo "CONFIG_AWS_IOT_BROKER_HOST_NAME=\"${BROKER_HOSTNAME}\"" >> prj.conf
- name: Set MQTT client ID to test device
run: |
echo "CONFIG_CLOUD_CLIENT_ID_USE_CUSTOM=y" >> prj.conf
echo "CONFIG_AWS_IOT_CLIENT_ID_MAX_LEN=40" >> prj.conf
echo "CONFIG_CLOUD_CLIENT_ID=\"${JOB_ID}\"" >> prj.conf
- name: Disable sampling of GPS after connection
## so device information is published quicker
run: CONFIG_APP_REQUEST_GPS_ON_INITIAL_SAMPLING=n >> prj.conf

- run: cat prj.conf

- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}

- name: Pull Docker image
run: docker pull ${{ needs.docker.outputs.docker_image }}

- name: Build
run: |
docker run --rm -v ${PWD}:/workdir/ncs/firmware ${{ needs.docker.outputs.docker_image }} /bin/bash -c 'cd ncs/firmware && west update && west build -p always -b ${{ matrix.board }} -- -DOVERLAY_CONFIG="overlay-debug.conf;asset-tracker-cloud-firmware-aws.conf" -DEXTRA_CFLAGS="-Werror=format-truncation"'
cp build/zephyr/merged.hex firmware.hex
cp prj.conf firmware.conf
- name: Build with changed version for FOTA test
run: |
echo "CONFIG_ASSET_TRACKER_V2_APP_VERSION=\"${APP_VERSION}-upgraded\"" >> prj.conf
docker run --rm -v ${PWD}:/workdir/ncs/firmware ${{ needs.docker.outputs.docker_image }} /bin/bash -c 'cd ncs/firmware && west update && west build -p always -b ${{ matrix.board }} -- -DOVERLAY_CONFIG="overlay-debug.conf;asset-tracker-cloud-firmware-aws.conf" -DEXTRA_CFLAGS="-Werror=format-truncation"'
cp build/zephyr/app_update.bin fota-upgrade.bin
cp prj.conf fota-upgrade.conf
- name: Keep certificates around
uses: actions/cache@v2
with:
path: ./certificates
key: certificates-2020-01-20

- name: Schedule Firmware CI job
uses: NordicSemiconductor/cloud-aws-firmware-ci-schedule-action@saga
id: schedule
with:
job id: ${{ env.JOB_ID }}
app version: ${{ env.APP_VERSION }}
aws access key id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws secret access key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws region: ${{ secrets.AWS_REGION }}
broker hostname: ${{ env.BROKER_HOSTNAME }}
stack name: ${{ secrets.STACK_NAME }}
firmware ci device id: ${{ secrets.DEVICE_ID }}
hex file: firmware.hex
fota file: fota-upgrade.bin
abort on: |
aws_fota: Error (-7) when trying to start firmware download
end on: |
aws_iot_integration.cloud_wrap_init: Version: ${{ env.APP_VERSION }}-upgraded
"appV"
"${{ env.APP_VERSION }}-upgraded"
cloud_module.data_send: Data sent
timeout in minutes: 20

- name: Run feature tests
uses: NordicSemiconductor/cloud-aws-firmware-ci-feature-runner-action@saga
# For now, ignore test failures until we get more experience running these tests
continue-on-error: true
with:
job id: ${{ env.JOB_ID }}
app version: ${{ env.APP_VERSION }}
aws access key id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws secret access key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws region: ${{ secrets.AWS_REGION }}
broker hostname: ${{ env.BROKER_HOSTNAME }}
stack name: ${{ secrets.STACK_NAME }}
feature dir: features

- name: Remove test device
# If the device did not connect, no Thing will have been created
if:
steps.schedule.outputs.connected == 'true' &&
!contains(toJSON(github.event.commits.*.message), '[skip-cleanup]')
run: |
CERT_ARN=`aws iot list-thing-principals --thing-name ${{ env.JOB_ID }} | jq -r '.principals[0]'`
CERT_ID=`echo $CERT_ARN | cut -d'/' -f2`
aws iot detach-thing-principal --thing-name ${{ env.JOB_ID }} --principal $CERT_ARN
aws iot update-certificate --certificate-id $CERT_ID --new-status INACTIVE
aws iot delete-certificate --certificate-id $CERT_ID
aws iot delete-thing --thing-name ${{ env.JOB_ID }}
- uses: actions/upload-artifact@v2
with:
name: end-to-end-test-${{ github.sha }}
path: |
firmware.hex
firmware.conf
fota-upgrade.bin
fota-upgrade.conf
certificates/*/device-${JOB_ID}*
fotaJobDocument.json
jobDocument.json
report.json
- name: Remove device certificates
run: rm -v ./certificates/*/device-*

release:
name: Release
runs-on: ubuntu-latest
Expand All @@ -351,7 +190,7 @@ jobs:
github.event_name == 'workflow_dispatch' || github.event_name ==
'repository_dispatch')

needs: [build, e2e]
needs: [build]

steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit 4f13a98

Please sign in to comment.