Skip to content

Commit

Permalink
Merge pull request #25 from taji-taji/support-linux
Browse files Browse the repository at this point in the history
Support Linux
  • Loading branch information
taji-taji authored Aug 21, 2022
2 parents 12f3170 + ea5db3a commit 7b6181b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
40 changes: 37 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- main

jobs:
build:
macOS:
strategy:
fail-fast: false
matrix:
Expand All @@ -20,8 +20,7 @@ jobs:
- xcode: "13.2.1"
macos: macos-12
runs-on: ${{ matrix.macos }}
env:
GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
name: macOS
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -44,4 +43,39 @@ jobs:
${{ runner.os }}-dependencies-${{ matrix.xcode }}-
- name: Test
run: swift test
linux:
strategy:
fail-fast: false
matrix:
swift: ["5.6", "5.5"]
include:
- swift: "5.6"
container: "swift:5.6"
cache-version: 2
- swift: "5.5"
container: "swift:5.5"
cache-version: 2
runs-on: ubuntu-latest
container: ${{ matrix.container }}
name: Linux
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get Swift Version
id: get-swift-version
run: |
echo "::set-output name=version::$(swift -version | head -n 1 | sed s/,// )"
shell: bash
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
.build/artifacts
.build/checkouts
.build/repositories
key: ${{ matrix.cache-version }}-${{ runner.os }}-${{ steps.get-swift-version.outputs.version }}}-spm-deps-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ matrix.cache-version }}-${{ runner.os }}-${{ steps.get-swift-version.outputs.version }}-spm-deps-
- name: Test
run: swift test

3 changes: 3 additions & 0 deletions Sources/DangerSwiftPeriphery/CheckstyleOutputParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
//

import Foundation
#if canImport(FoundationXML)
import FoundationXML
#endif

protocol CheckstyleOutputParsable {
func parse(xml: String) throws -> [Violation]
Expand Down

0 comments on commit 7b6181b

Please sign in to comment.