Skip to content

Run some tests on GitHub Actions CI #8312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 177 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
name: Dotty CI

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
container: akmetiuk/dotty:2020-02-12

steps:
- name: Git Checkout
uses: actions/checkout@v2

- name: Cache Ivy
uses: actions/[email protected]
with:
path: /root/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-ivy-

- name: Cache SBT
uses: actions/[email protected]
with:
path: /root/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
restore-keys: ${{ runner.os }}-sbt-

- name: Cache Coursier and Mill
uses: actions/[email protected]
with:
path: /root/.cache
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-general-

- name: Test
run: |
./project/scripts/sbt ";compile ;test"
./project/scripts/cmdTests

test_bootstrapped:
runs-on: ubuntu-latest
container: akmetiuk/dotty:2020-02-12

steps:
- name: Git Checkout
uses: actions/checkout@v2

- name: Cache Ivy
uses: actions/[email protected]
with:
path: /root/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-ivy-

- name: Cache SBT
uses: actions/[email protected]
with:
path: /root/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
restore-keys: ${{ runner.os }}-sbt-

- name: Cache Coursier and Mill
uses: actions/[email protected]
with:
path: /root/.cache
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-general-

- name: Test
run: |
./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test ;configureIDE"
./project/scripts/bootstrapCmdTests

# community_build:
# runs-on: ubuntu-latest
# container: akmetiuk/dotty:2020-02-12

# steps:
# - name: Git Checkout
# uses: actions/checkout@v2

# - name: Cache Ivy
# uses: actions/[email protected]
# with:
# path: /root/.ivy2/cache
# key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
# restore-keys: ${{ runner.os }}-ivy-

# - name: Cache SBT
# uses: actions/[email protected]
# with:
# path: /root/.sbt
# key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
# restore-keys: ${{ runner.os }}-sbt-

# - name: Cache Coursier and Mill
# uses: actions/[email protected]
# with:
# path: /root/.cache
# key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
# restore-keys: ${{ runner.os }}-general-

# - name: Test
# run: |
# git submodule sync
# git submodule update --init --recursive --jobs 7
# ./project/scripts/sbt community-build/test

test_sbt:
runs-on: ubuntu-latest
container: akmetiuk/dotty:2020-02-12
if: github.event_name == 'push' &&
startsWith(github.event.ref, 'refs/tags/')

steps:
- name: Git Checkout
uses: actions/checkout@v2

- name: Cache Ivy
uses: actions/[email protected]
with:
path: /root/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-ivy-

- name: Cache SBT
uses: actions/[email protected]
with:
path: /root/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
restore-keys: ${{ runner.os }}-sbt-

- name: Cache Coursier and Mill
uses: actions/[email protected]
with:
path: /root/.cache
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-general-

- name: Test
run: ./project/scripts/sbt sbt-dotty/scripted

test_java11:
runs-on: ubuntu-latest
container: akmetiuk/dotty:2020-02-12
if: github.event_name == 'push' &&
startsWith(github.event.ref, 'refs/tags/')

steps:
- name: Git Checkout
uses: actions/checkout@v2

- name: Cache Ivy
uses: actions/[email protected]
with:
path: /root/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-ivy-

- name: Cache SBT
uses: actions/[email protected]
with:
path: /root/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('project/**') }}
restore-keys: ${{ runner.os }}-sbt-

- name: Cache Coursier and Mill
uses: actions/[email protected]
with:
path: /root/.cache
key: ${{ runner.os }}-general-${{ hashFiles('**/build.sbt') }}
restore-keys: ${{ runner.os }}-general-

- name: Test
run: |
export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH"
./project/scripts/sbt ";compile ;test"