ring-client 0.1.3

A Rust client for interfacing with Ring home security devices.
Documentation
on:
  pull_request:
  push:
    branches: [main]
  schedule:
    - cron: "7 7 * * *"

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

permissions:
  contents: read

name: Nightly

jobs:
  nightly:
    runs-on: ubuntu-latest
    name: Test (nightly)
    steps:
      - uses: actions/checkout@v6

      - name: Install nightly
        uses: dtolnay/rust-toolchain@nightly

      - name: Setup environment variables
        uses: SpicyPizza/create-envfile@v2.0
        with:
          envkey_RING_REFRESH_TOKEN: ${{ secrets.RING_REFRESH_TOKEN }}
          directory: ./
          file_name: .env
          fail_on_empty: false

      - name: cargo test --locked
        run: cargo test --locked --all-features --all-targets

      - name: cargo test --doc
        run: cargo test --locked --all-features --doc

      - uses: ryanmab/incident-io-alert@v0.1.2
        if: failure() && github.event_name == 'schedule'
        with:
          alert_source_id: ${{ secrets.ALERT_SOURCE_ID }}
          alert_source_token: ${{ secrets.ALERT_SOURCE_TOKEN }}
          title: "Ring Client repository: Nightly build failure"
          status: firing
          description: |
            The nightly build for the Ring Client repository has failed.

            This would indicate that there is an upcoming set of breaking changes to Rust, or
            other dependencies, which will require an update to the Ring Client library.

  update:
    runs-on: ubuntu-latest
    name: Test (beta / updated)
    steps:
      - uses: actions/checkout@v6

      - name: Install nightly
        uses: dtolnay/rust-toolchain@beta

      - name: Setup environment variables
        uses: SpicyPizza/create-envfile@v2.0
        with:
          envkey_RING_REFRESH_TOKEN: ${{ secrets.RING_REFRESH_TOKEN }}
          directory: ./
          file_name: .env
          fail_on_empty: false

      - name: cargo update
        run: cargo update

      - name: cargo test
        run: cargo test --locked --all-features --all-targets
        env:
          RUSTFLAGS: -D deprecated

      - name: cargo test --doc
        run: cargo test --locked --all-features --doc
        env:
          RUSTFLAGS: -D deprecated

      - uses: ryanmab/incident-io-alert@v0.1.2
        if: failure() && github.event_name == 'schedule'
        with:
          alert_source_id: ${{ secrets.ALERT_SOURCE_ID }}
          alert_source_token: ${{ secrets.ALERT_SOURCE_TOKEN }}
          title: "Ring Client repository: Nightly build failure"
          status: firing
          description: |
            The nightly build for the Ring Client repository has failed.

            This would indicate that there is an upcoming set of breaking changes to Rust, or
            other dependencies, which will require an update to the Ring Client library.