diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..908be79 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: Crystal CI +on: + pull_request: + branches: [ "main" ] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-node@v4 + with: + node-version: 20.x + - uses: crystal-lang/install-crystal@v1 + with: + crystal: 1.6.2 + - name: Download source + uses: actions/checkout@v4 + - name: Install dependencies + run: shards install + - name: Run tests + run: crystal spec diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 919f156..3eab2f0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,8 +3,6 @@ name: Crystal Docs Generation on: push: branches: [ "main" ] - pull_request: - branches: [ "main" ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -25,11 +23,14 @@ jobs: runs-on: ubuntu-latest - container: - image: crystallang/crystal - steps: - - uses: actions/checkout@v3 + - uses: actions/setup-node@v4 + with: + node-version: 20.x + - uses: crystal-lang/install-crystal@v1 + with: + crystal: 1.6.2 + - uses: actions/checkout@v4 - name: Generate docs run: crystal docs - name: Move docs to _site