drupal_kit 0.3.3

Flexible Drupal HTTP client supporting a variety of popular contrib modules
Documentation
name: Lint & Test

on:
  push:
    branches:
      - main
  pull_request:
    types: [opened, synchronize, reopened]
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  lint_test:
    name: Lint & Test
    runs-on: ubuntu-latest
    strategy:
      matrix:
        feature: ["", "consumer", "simple-oauth"]
    defaults:
      run:
        shell: nix develop --command bash {0}
    steps:
      - uses: actions/checkout@v1

      - name: Install nix
        uses: nixbuild/nix-quick-install-action@v25

      - name: Restore and cache Nix store
        uses: nix-community/cache-nix-action@v3
        with:
          key: cache-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
          restore-keys: |
            cache-${{ runner.os }}-

          purge-caches: true
          purge-key: cache-${{ runner.os }}-
          purge-created: true
          purge-created-max-age: 42

      - name: Lint
        run: cargo clippy --no-default-features --features "${{ matrix.feature }}"

      - name: Test
        run: cargo test --no-default-features --features "${{ matrix.feature }}"