diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..4bf9126f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.cr text eol=lf +*.ecr text eol=lf \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 983dc679..f473bda2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,31 +11,66 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] crystal: [latest, nightly] runs-on: ${{ matrix.os }} steps: - name: Install Crystal - uses: oprypin/install-crystal@v1 + uses: crystal-lang/install-crystal@v1 with: crystal: ${{ matrix.crystal }} - name: Download source - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install dependencies run: shards install - env: - SHARDS_OPTS: --ignore-crystal-version - name: Run specs run: | crystal spec - crystal spec --release --no-debug + + format: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + crystal: [latest, nightly] + runs-on: ${{ matrix.os }} + + steps: + - name: Install Crystal + uses: crystal-lang/install-crystal@v1 + with: + crystal: ${{ matrix.crystal }} + + - name: Download source + uses: actions/checkout@v4 - name: Check formatting run: crystal tool format --check + + ameba: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + crystal: [latest] + runs-on: ${{ matrix.os }} + + steps: + - name: Install Crystal + uses: crystal-lang/install-crystal@v1 + with: + crystal: ${{ matrix.crystal }} + + - name: Download source + uses: actions/checkout@v4 + + - name: Install dependencies + run: shards install - name: Run ameba linter run: bin/ameba + \ No newline at end of file diff --git a/spec/view_spec.cr b/spec/view_spec.cr index 205f94fa..79b87687 100644 --- a/spec/view_spec.cr +++ b/spec/view_spec.cr @@ -22,11 +22,7 @@ describe "Views" do end request = HTTP::Request.new("GET", "/view/world") client_response = call_request_on_app(request) - {% if flag?(:windows) %} - client_response.body.strip.should eq("Hello world\r\n") - {% else %} - client_response.body.strip.should eq("Hello world\n") - {% end %} + client_response.body.strip.should eq("Hello world\n") end it "renders layout" do