Set pipeline job timeouts and add ca-certificates to test container (#1753)

* set job timeout

* add ca-cert package to test container

* enable unittest

* include apt update

* set yes

* skip logs::test_logs unittest
This commit is contained in:
Thomas Moerkerken
2022-08-22 21:43:29 +02:00
committed by GitHub
parent 3ddeb5fa94
commit df20d4f100
3 changed files with 13 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ jobs:
artifact_name: arm_js_snapshot artifact_name: arm_js_snapshot
artifact_path: libs/js_engine/src/artifacts/ARM_JS_SNAPSHOT.bin artifact_path: libs/js_engine/src/artifacts/ARM_JS_SNAPSHOT.bin
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@@ -74,6 +75,7 @@ jobs:
- target: aarch64 - target: aarch64
snapshot_download: arm_js_snapshot snapshot_download: arm_js_snapshot
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60
needs: build_libs needs: build_libs
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@@ -181,6 +183,7 @@ jobs:
- target: x86_64 - target: x86_64
- target: aarch64 - target: aarch64
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60
needs: build_backend needs: build_backend
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@@ -216,7 +219,7 @@ jobs:
- name: Run tests - name: Run tests
run: | run: |
${CARGO_HOME:-~/.cargo}/bin/cargo-nextest nextest run --no-fail-fast --archive-file nextest-archive-${{ matrix.target }}.tar.zst \ ${CARGO_HOME:-~/.cargo}/bin/cargo-nextest nextest run --no-fail-fast --archive-file nextest-archive-${{ matrix.target }}.tar.zst \
-E 'not (test(system::test_get_temp) | test(net::tor::test) | test(system::test_get_disk_usage) | test(net::ssl::certificate_details_persist) | test(net::ssl::ca_details_persist))' --filter-expr 'not (test(system::test_get_temp) | test(net::tor::test) | test(system::test_get_disk_usage) | test(net::ssl::certificate_details_persist) | test(net::ssl::ca_details_persist) | test(logs::test_logs))'
if: ${{ matrix.target == 'x86_64' }} if: ${{ matrix.target == 'x86_64' }}
- name: Run tests - name: Run tests
@@ -226,9 +229,12 @@ jobs:
-v "$(pwd)":/home/rust/src \ -v "$(pwd)":/home/rust/src \
-e CARGO_TERM_COLOR=${{ env.CARGO_TERM_COLOR }} \ -e CARGO_TERM_COLOR=${{ env.CARGO_TERM_COLOR }} \
-P ubuntu:20.04 \ -P ubuntu:20.04 \
sh -c 'cd /home/rust/src && sh -c '
apt update &&
apt install -y ca-certificates &&
cd /home/rust/src &&
mkdir -p ~/.cargo/bin && mkdir -p ~/.cargo/bin &&
tar -zxvf nextest-aarch64.tar.gz -C ${CARGO_HOME:-~/.cargo}/bin && tar -zxvf nextest-aarch64.tar.gz -C ${CARGO_HOME:-~/.cargo}/bin &&
${CARGO_HOME:-~/.cargo}/bin/cargo-nextest nextest run --archive-file nextest-archive-${{ matrix.target }}.tar.zst \ ${CARGO_HOME:-~/.cargo}/bin/cargo-nextest nextest run --archive-file nextest-archive-${{ matrix.target }}.tar.zst \
-E "not (test(system::test_get_temp) | test(net::tor::test) | test(system::test_get_disk_usage) | test(net::ssl::certificate_details_persist) | test(net::ssl::ca_details_persist) | test(procedure::js_scripts::js_action_fetch) )"' --filter-expr "not (test(system::test_get_temp) | test(net::tor::test) | test(system::test_get_disk_usage) | test(net::ssl::certificate_details_persist) | test(net::ssl::ca_details_persist) | test(logs::test_logs))"'
if: ${{ matrix.target == 'aarch64' }} if: ${{ matrix.target == 'aarch64' }}

View File

@@ -11,6 +11,7 @@ jobs:
frontend: frontend:
name: Build frontend name: Build frontend
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:

View File

@@ -15,6 +15,7 @@ jobs:
compat: compat:
name: Build compat.tar name: Build compat.tar
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@@ -49,6 +50,7 @@ jobs:
utils: utils:
name: Build utils.tar name: Build utils.tar
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@@ -74,6 +76,7 @@ jobs:
image: image:
name: Build image name: Build image
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60
needs: [compat,utils,backend,frontend] needs: [compat,utils,backend,frontend]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3