Skip to content

Commit e03fee5

Browse files
authored
Merge pull request htacg#970 from balthisar/next
Create api_test.yml
2 parents 1ef183a + 8b4a06d commit e03fee5

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

.github/workflows/api_test.yml

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
################################################################################
2+
# Test LibTidy Public API (via Swift SwLibTidy).
3+
#
4+
# Because SwLibTidy wraps nearly 100% of LibTidy's API, it's a great candidate
5+
# for testing LibTidy via a high-level, easy to write and understand tests.
6+
#
7+
# - This is a Public API test of LibTidy. It does not test the console
8+
# application, is not a unit test, and is not an output regression test.
9+
#
10+
# - Build on multiple operating systems, once the runners are equipped with
11+
# Swift.
12+
#
13+
################################################################################
14+
15+
name: API Test via SwLibTidy
16+
17+
on:
18+
push:
19+
paths:
20+
- 'src/**'
21+
- 'include/**'
22+
- '.github/workflows/**'
23+
pull_request:
24+
paths:
25+
- 'src/**'
26+
- 'include/**'
27+
- '.github/workflows/**'
28+
29+
jobs:
30+
31+
test_library_api:
32+
runs-on: ${{ matrix.os }}
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
include:
37+
38+
############################################################
39+
# Ubuntu latest is a normal build with nothing special that
40+
# really need be done.
41+
# Note: currently disabled because some tests need to be
42+
# refactored to avoid using macOS specific library calls.
43+
############################################################
44+
# - os: ubuntu-latest
45+
# name: Ubuntu
46+
47+
############################################################
48+
# On macOS, we'll build both architectures.
49+
# Note: this is the currently only enabled runner, and I'm
50+
# comfortable with it. This excercises nearly all of
51+
# HTML Tidy's library API, which should be platform
52+
# agnostic.
53+
############################################################
54+
- os: macOS-latest
55+
name: macOS
56+
57+
############################################################
58+
# The standard Windows build is perfectly vanilla, and as
59+
# of now is using MSVC 19.
60+
# Note: currently disabled because some tests need to be
61+
# refactored to avoid using macOS specific library calls,
62+
# but mostly because the Windows runners aren't set up
63+
# yet for running Swift code.
64+
############################################################
65+
# - os: windows-latest
66+
# name: MSVC
67+
68+
steps:
69+
70+
############################################################
71+
# Checkout the Swift testing repository.
72+
############################################################
73+
- name: Checkout SwLibTidy
74+
uses: actions/checkout@v2
75+
with:
76+
repository: balthisar/swlibtidy-test
77+
78+
79+
############################################################
80+
# Checkout the Tidy repository as Source/CLibTidy
81+
############################################################
82+
- name: Checkout this repository
83+
uses: actions/checkout@v2
84+
with:
85+
path: ${{github.workspace}}/Sources/CLibTidy
86+
87+
88+
############################################################
89+
# Perform swift test
90+
# Note: Github truncates the in-browser log. If you want
91+
# to see everything, look for the Raw Logs button.
92+
############################################################
93+
- name: Swift Test
94+
run: |
95+
swift test

0 commit comments

Comments
 (0)