Skip to content

Commit 25dea2f

Browse files
committed
Basic CI test for all languages.
1 parent 2061a43 commit 25dea2f

File tree

10 files changed

+173
-0
lines changed

10 files changed

+173
-0
lines changed

.github/workflows/c-cmocka.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test C 99 + Cmocka
2+
3+
on:
4+
push:
5+
paths:
6+
- 'c-cmocka/**'
7+
- '.github/workflows/c-cmocka**'
8+
branches:
9+
- with_assertions
10+
pull_request:
11+
paths:
12+
- 'c-cmocka/**'
13+
- '.github/workflows/c-cmocka99**'
14+
branches:
15+
- with_assertions
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out the repo
22+
uses: actions/checkout@v2
23+
24+
- name: Install cmocka
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install libcmocka-dev
28+
29+
# - name: Build and test
30+
# working-directory: c-cmocka
31+
# run: |
32+
# gcc -std=c99 -pedantic -pedantic-errors -Werror -Wall -Wextra Parrot.c ParrotTest.c -l cmocka -o ParrotTest
33+
# ./ParrotTest

.github/workflows/csharp-xunit.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test CSharp .NET 2 + XUnit
2+
3+
on:
4+
push:
5+
paths:
6+
- 'csharp-xunit/**'
7+
- '.github/workflows/csharp-xunit**'
8+
branches:
9+
- with_assertions
10+
pull_request:
11+
paths:
12+
- 'csharp-xunit/**'
13+
- '.github/workflows/csharp-xunit**'
14+
branches:
15+
- with_assertions
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out the repo
22+
uses: actions/checkout@v2
23+
24+
- name: Setup .NET
25+
uses: actions/setup-dotnet@v1
26+
with:
27+
dotnet-version: 2.0.x
28+
29+
- name: Build and test
30+
working-directory: csharp-xunit
31+
run: |
32+
dotnet restore
33+
dotnet build --no-restore
34+
dotnet test --no-build --verbosity normal

.github/workflows/java-junit.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test Java 8 + JUnit 4
2+
3+
on:
4+
push:
5+
paths:
6+
- 'java-junit/**'
7+
- '.github/workflows/java-junit**'
8+
branches:
9+
- with_assertions
10+
pull_request:
11+
paths:
12+
- 'java-junit/**'
13+
- '.github/workflows/java-junit**'
14+
branches:
15+
- with_assertions
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out the repo
22+
uses: actions/checkout@v2
23+
24+
- name: Set up Java
25+
uses: actions/setup-java@v1
26+
with:
27+
java-version: 1.8
28+
- name: Cache Maven packages
29+
uses: actions/cache@v2
30+
with:
31+
path: ~/.m2
32+
key: ${{ runner.os }}-m2-${{ hashFiles('java-junit/pom.xml') }}
33+
restore-keys: ${{ runner.os }}-m2
34+
35+
- name: Build and test
36+
working-directory: java-junit
37+
run: ./mvnw -B test

.github/workflows/php-phpunit.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test PHP 5.6 + PHPUnit 4.8
2+
3+
on:
4+
push:
5+
paths:
6+
- 'php-phpunit/**'
7+
- '.github/workflows/php-phpunit**'
8+
branches:
9+
- with_assertions
10+
pull_request:
11+
paths:
12+
- 'php-phpunit/**'
13+
- '.github/workflows/php-phpunit**'
14+
branches:
15+
- with_assertions
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out the repo
22+
uses: actions/checkout@v2
23+
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: 5.6
28+
29+
- name: Test
30+
working-directory: php-phpunit
31+
run: |
32+
composer install
33+
./run_first_session.sh
34+
./phpunit.sh

.github/workflows/python-unittest.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Test Python 2 + UnitTest
2+
3+
on:
4+
push:
5+
paths:
6+
- 'python-unittest/**'
7+
- '.github/workflows/python-unittest**'
8+
branches:
9+
- with_assertions
10+
pull_request:
11+
paths:
12+
- 'python-unittest/**'
13+
- '.github/workflows/python-unittest**'
14+
branches:
15+
- with_assertions
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out the repo
22+
uses: actions/checkout@v2
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: '2.x'
28+
29+
- name: Test
30+
working-directory: python-unittest
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install -r requirements.txt
34+
./run_first_session.sh
35+
./run_tests.sh

java-junit/mvnw

100644100755
File mode changed.

php-phpunit/phpunit.sh

100644100755
File mode changed.

php-phpunit/run_first_session.sh

100644100755
File mode changed.

python-unittest/run_first_session.sh

100644100755
File mode changed.

python-unittest/run_tests.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)