Skip to content

Commit

Permalink
Update CI for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sdogruyol committed Sep 30, 2024
1 parent b820a1d commit 5b47a00
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 11 deletions.
47 changes: 41 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: Install dependencies
run: shards install

- 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: Run ameba linter
run: bin/ameba

6 changes: 1 addition & 5 deletions spec/view_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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("<html>Hello world\r\n</html>")
{% else %}
client_response.body.strip.should eq("<html>Hello world\n</html>")
{% end %}
client_response.body.strip.should eq("<html>Hello world\n</html>")

Check failure on line 25 in spec/view_spec.cr

View workflow job for this annotation

GitHub Actions / test (windows-latest, latest)

got: "<html>Hello world\r\n" + "</html>"

Check failure on line 25 in spec/view_spec.cr

View workflow job for this annotation

GitHub Actions / test (windows-latest, nightly)

got: "<html>Hello world\r\n" + "</html>"

Check failure on line 25 in spec/view_spec.cr

View workflow job for this annotation

GitHub Actions / test (windows-latest, latest)

got: "<html>Hello world\r\n" + "</html>"

Check failure on line 25 in spec/view_spec.cr

View workflow job for this annotation

GitHub Actions / test (windows-latest, nightly)

got: "<html>Hello world\r\n" + "</html>"
end

it "renders layout" do
Expand Down

0 comments on commit 5b47a00

Please sign in to comment.