Skip to content

Commit

Permalink
Replace Travis CI with GitHub Actions (#81)
Browse files Browse the repository at this point in the history
* Replace Travis with GHA

* add separate workflow for PRs to avoid badge interference
  • Loading branch information
cmccandless authored Jun 30, 2021
1 parent d0e696d commit 1bc12d8
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 34 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will do a clean install of the dependencies and run tests across different versions

name: Ballerina / main

on:
push:
branches: [master, main]
workflow_dispatch:

jobs:
ci:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
java-version: [8]
ballerina-version: [0.991.0]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}

- name: Install project dependencies
shell: bash
env:
BALLERINA_VERSION: ballerina-${{ matrix.ballerina-version }}
run: |
# Download Ballerina dist
curl -fsSL https://dist.ballerina.io/downloads/${{ matrix.ballerina-version }}/$BALLERINA_VERSION.zip --output $BALLERINA_VERSION.zip
# Unzip the zip file
unzip -q $BALLERINA_VERSION.zip
# Add Ballerina to system path
echo "$(pwd)/$BALLERINA_VERSION/bin" >> $GITHUB_PATH
- name: Run exercism/ballerina ci (runs tests) for all exercises
run: |
cd exercises
bash -xe run_ballerina_tests.sh
12 changes: 6 additions & 6 deletions .github/workflows/configlet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Fetch configlet
uses: exercism/github-actions/configlet-ci@main
- name: Configlet Linter
run: configlet lint
- name: Fetch configlet
uses: exercism/github-actions/configlet-ci@main

- name: Configlet Linter
run: configlet lint
42 changes: 42 additions & 0 deletions .github/workflows/pr.ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will do a clean install of the dependencies and run tests across different versions

name: Ballerina / PR

on:
workflow_dispatch:
pull_request:

jobs:
ci:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
java-version: [8]
ballerina-version: [0.991.0]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}

- name: Install project dependencies
shell: bash
env:
BALLERINA_VERSION: ballerina-${{ matrix.ballerina-version }}
run: |
# Download Ballerina dist
curl -fsSL https://dist.ballerina.io/downloads/${{ matrix.ballerina-version }}/$BALLERINA_VERSION.zip --output $BALLERINA_VERSION.zip
# Unzip the zip file
unzip -q $BALLERINA_VERSION.zip
# Add Ballerina to system path
echo "$(pwd)/$BALLERINA_VERSION/bin" >> $GITHUB_PATH
- name: Run exercism/ballerina ci (runs tests) for all exercises
run: |
cd exercises
bash -xe run_ballerina_tests.sh
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Exercism Ballerina Track

![build status](https://travis-ci.org/exercism/ballerina.svg?branch=master)
[![Configlet Status](https://github.com/exercism/ballerina/workflows/Configlet%20CI/badge.svg)]
[![Exercise Test Status](https://github.com/exercism/ballerina/workflows/Ballerina%20%2F%20main/badge.svg)]

Exercism exercises in Ballerina. [Ballerina](https://ballerina.io/) is a compiled, transactional, statically and strongly typed programming language with textual and graphical syntaxes. Ballerina incorporates fundamental concepts of distributed system integration into the language and offers a type-safe, concurrent environment to implement microservices with distributed transactions, reliable messaging, stream processing, and workflows.

Expand Down

0 comments on commit 1bc12d8

Please sign in to comment.