Add regular_hours clear command (#154)
#734
This file contains hidden or 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: Crystal CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| inputs: | |
| crystal_version: | |
| description: "Crystal version" | |
| required: false | |
| default: "1.17.1" | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| crystal: ["${{ inputs.crystal_version }}"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Download source | |
| uses: actions/checkout@v4 | |
| # TODO Why is this necessary now? | |
| - name: Install dependencies (Linux only) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y libreadline-dev | |
| - name: Install Crystal | |
| uses: crystal-lang/install-crystal@v1 | |
| with: | |
| crystal: ${{ matrix.crystal }} | |
| - name: Cache shards | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/shards | |
| lib | |
| bin/ameba | |
| key: ${{ runner.os }}-shards-v2-${{ hashFiles('**/shard.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-shards-v2- | |
| - name: Install shards | |
| run: shards install --frozen | |
| - name: Check for dead code | |
| run: crystal tool unreachable src/tanda_cli.cr --check | |
| - name: Check formatting | |
| run: crystal tool format --check | |
| - name: Lint | |
| run: ./bin/ameba | |
| - name: Compile | |
| run: crystal build src/tanda_cli.cr | |
| - name: Run tests | |
| run: ./scripts/run-spec.sh |