Skip to content

Commit

Permalink
CI periodic testing (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
giarc3 committed Mar 5, 2021
1 parent 1bfba0a commit dd2017f
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 37 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yaml
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- main
pull_request:
schedule:
- cron: "0 14 * * 1" # Mondays at 2pm UTC

jobs:
cargo-test:
Expand All @@ -31,6 +33,9 @@ jobs:
features: tls-rustls --no-default-features
- os: ubuntu-18.04
features: tls-vendored-openssl --no-default-features
- os: ubuntu-18.04
toolchain: beta
features: default
# MSRV
- os: ubuntu-18.04
toolchain: 1.41.1
Expand Down Expand Up @@ -66,6 +71,11 @@ jobs:
path: Cargo.lock
- name: Cargo test
run: cargo test --features ${{ matrix.features }}
- name: Post to Slack on failure of scheduled run
if: failure() && github.event_name == 'schedule'
run: |
curl -L -X POST '${{ secrets.SLACK_WEBHOOK }}' \
-F "payload={\"text\": \"Failed a run of <$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID|$GITHUB_REPOSITORY>.\"}"
cargo-build:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -108,6 +118,11 @@ jobs:
use-cross: true
command: build
args: --target ${{ matrix.target }} --features "beta blocking tls-rustls" --no-default-features
- name: Post to Slack on failure of scheduled run
if: failure() && github.event_name == 'schedule'
run: |
curl -L -X POST '${{ secrets.SLACK_WEBHOOK }}' \
-F "payload={\"text\": \"Failed a run of <$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID|$GITHUB_REPOSITORY>.\"}"
format:
runs-on: ubuntu-18.04
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/daily.yaml
@@ -0,0 +1,39 @@
name: Daily runs

# Run daily and also when Cargo.toml changes
on:
schedule:
- cron: "0 14 * * *" # Daily at 2pm UTC
push:
paths:
- "**/Cargo.toml"

jobs:
security-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run audit checker
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Generate the Cargo.lock that will be used for the tests so we can upload it as an artifact
- run: cargo generate-lockfile
- uses: actions/upload-artifact@v2
with:
path: Cargo.lock
- name: Decrypt test keys
run: openssl aes-256-cbc -d -K ${{ secrets.OPENSSL_KEY }} -iv ${{ secrets.OPENSSL_IV }} -in tests/testkeys/iak-dev.pem.enc -out tests/testkeys/iak-dev.pem
- run: cargo test --features beta
env:
IRONCORE_ENV: dev
- name: Post to Slack on failure
if: failure()
run: |
curl -L -X POST '${{ secrets.SLACK_WEBHOOK }}' \
-F "payload={\"text\": \"Failed a run of <$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID|$GITHUB_REPOSITORY>.\"}"
37 changes: 0 additions & 37 deletions .github/workflows/security-audit.yaml

This file was deleted.

0 comments on commit dd2017f

Please sign in to comment.