1+ name : Tests 
2+ 
3+ on :
4+   push :
5+     branches : [ main ] 
6+     paths-ignore : [ README.md ] 
7+   pull_request :
8+     branches : [ main ] 
9+     paths-ignore : [ README.md ] 
10+   workflow_dispatch :
11+   
12+ jobs :
13+   formatlint :
14+     name : Format linting 
15+     runs-on : ubuntu-latest 
16+     steps :
17+       - name : Checkout 
18+         uses : actions/checkout@v3 
19+       - name : Set up Docker Buildx 
20+         uses : docker/setup-buildx-action@v2 
21+       - name : Pull formatting docker image 
22+         run : docker pull ghcr.io/nicklockwood/swiftformat:latest 
23+       - name : Run format linting 
24+         run : docker run --rm -v ${{ github.workspace }}:/repo ghcr.io/nicklockwood/swiftformat:latest /repo --lint 
25+ 
26+   macos :
27+     name : Test on macOS 
28+     runs-on : macOS-latest 
29+     steps :
30+     - uses : maxim-lobanov/setup-xcode@v1 
31+       with :
32+         xcode-version : latest-stable 
33+     - uses : actions/checkout@v3 
34+     - name : Build and test 
35+       run : swift test --parallel --enable-test-discovery 
36+ 
37+   linux :
38+     name : Test on Linux 
39+     runs-on : ubuntu-latest 
40+     steps :
41+     - uses : swift-actions/setup-swift@v2 
42+     - uses : actions/checkout@v3 
43+     - name : Test 
44+       run : swift test --parallel --enable-code-coverage 
45+     - name : Get test coverage html 
46+       run : | 
47+         llvm-cov show \ 
48+           $(swift build --show-bin-path)/DataLoaderPackageTests.xctest \ 
49+           --instr-profile $(swift build --show-bin-path)/codecov/default.profdata \ 
50+           --ignore-filename-regex="\.build|Tests" \ 
51+           --format html \ 
52+           --output-dir=.test-coverage 
53+      - name : Upload test coverage html 
54+       uses : actions/upload-artifact@v3 
55+       with :
56+         name : test-coverage-report 
57+         path : .test-coverage 
58+ 
59+   backcompat-ubuntu-22_04 :
60+     name : Test Swift ${{ matrix.swift }} on Ubuntu 22.04 
61+     runs-on : ubuntu-22.04 
62+     strategy :
63+       matrix :
64+         swift : ["5.7", "5.8", "5.9", "5.10"] 
65+     steps :
66+     - uses : swift-actions/setup-swift@v2 
67+       with :
68+         swift-version : ${{ matrix.swift }} 
69+     - uses : actions/checkout@v3 
70+     - name : Test 
71+       run : swift test --parallel 
0 commit comments