This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
Add archive status note #130
This file contains 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
on: | |
push: | |
branches: [main] | |
pull_request: | |
name: compliance | |
# cancel in-flight CI runs | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
compliance: | |
runs-on: ubuntu-latest | |
name: Compliance tests | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: cargo generate-lockfile | |
if: hashFiles('Cargo.lock') == '' | |
run: cargo generate-lockfile | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build --package rynamodb | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest pytest-timeout boto3 requests | |
- name: Run the compliance tests | |
run: | | |
pytest --timeout 30 --junit-xml report.xml compliance-tests || true | |
- name: Summarise the results | |
run: | | |
python ./scripts/compliance_report.py report.xml \ | |
--post-secret "${{ secrets.COMPLIANCE_TRACKER_SECRET }}" \ | |
-o $GITHUB_STEP_SUMMARY | |
compliance-roundtrip: | |
runs-on: ubuntu-latest | |
name: compliance roundtrip | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: Build the binary | |
run: cargo build --package rynamodb | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install boto3 pynamodb | |
- name: Start rynamodb | |
run: env RUST_LOG=rynamodb=trace ./target/debug/rynamodb & | |
- name: Wait for the server to start | |
run: | | |
while true; do | |
curl http://localhost:3050/_health | grep ok && break; | |
sleep 1; | |
done | |
- name: Run the compliance roundtrip script | |
run: python ./scripts/compliance_roundtrip.py | |
env: | |
AWS_ACCESS_KEY_ID: test | |
AWS_SECRET_ACCESS_KEY: test | |
AWS_DEFAULT_REGION: us-east-1 |