Merge pull request #18 from yougov/allow-nested-segment-creation #11
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
name: Rust | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout submodules | |
shell: bash | |
run: | | |
# If your submodules are configured to use SSH instead of HTTPS please uncomment the following line | |
# git config --global url."https://github.com/".insteadOf "[email protected]:" | |
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | |
git submodule sync --recursive | |
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | |
- name: Install Rust stable with clippy and rustfmt | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: rustfmt, clippy | |
- name: Build and run daemon | |
shell: bash | |
run: | | |
docker build -t newrelic-daemon -f Dockerfile.daemon . | |
docker run --rm \ | |
-d \ | |
-v $PWD/newrelic-logs:/var/log/newrelic \ | |
-v /tmp:/tmp \ | |
newrelic-daemon | |
- name: Run fmt | |
run: cargo fmt -- --check | |
- name: Run clippy | |
run: cargo clippy -- -D warnings | |
- name: Run tests | |
env: | |
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} | |
run: cargo test --verbose |