Skip to content

Commit

Permalink
ci: add action to setup SCION and run integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mlegner committed Nov 23, 2023
1 parent ecf0bea commit f4eeeb9
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/actions/setup-scion/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Setup SCION
description: Setup SCION and run local topology and verify that it works
outputs:
daemon-address-as111:
description: The address (including port) of AS 1-ff00:0:112
value: "${{ steps.local-topology.outputs.daemon-address-as111 }}"

runs:
using: composite
steps:
- name: Clone SCION repository
run: git clone https://github.com/scionproto/scion
shell: bash
- name: Install SCION
working-directory: ./scion
run: |
./tools/install_bazel
./tools/install_deps
./scion.sh bazel-remote
make
shell: bash
- name: Generate and run local topology
id: local-topology
working-directory: ./scion
run: |
./scion.sh topology -c topology/tiny.topo
./scion.sh run
echo "daemon-address-as111=$(./scion.sh sciond-addr 111)" >> $GITHUB_OUTPUT
shell: bash
- name: Verify that topology runs correctly
working-directory: ./scion
run: |
sleep 10s
bin/end2end_integration
bin/scion showpaths --sciond ${{ steps.local-topology.outputs.daemon-address-as111 }} 1-ff00:0:112
shell: bash
12 changes: 10 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,17 @@ jobs:
save-if: "false"
- run: sudo apt-get install protobuf-compiler
- run: cargo install cargo-tarpaulin@0.27.1
- name: Install SCION and run local topology
uses: "./.github/actions/setup-scion"
id: scion

- name: Run tests and record coverage
run: cargo tarpaulin --workspace --skip-clean --all-targets --doc --out html --out xml --exclude-files "crates/scion-grpc/*"
- name: Run tests (including integration tests) and record coverage
run: >
DAEMON_ADDRESS=${{ steps.scion.outputs.daemon-address-as111 }}
cargo tarpaulin --workspace --skip-clean --all-targets --doc
--out html --out xml
--exclude-files "crates/scion-grpc/*"
-- --include--ignored
- name: Upload coverage report
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit f4eeeb9

Please sign in to comment.