-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
539 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Copyright (c) 2022 Jaehong Kang | ||
# Licensed under Apache License v2.0 | ||
|
||
name: Action Tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/action-tests.yml' | ||
- 'action.yml' | ||
- 'swift' | ||
- 'libexec/**/*' | ||
- 'action-tests/**/*' | ||
pull_request: | ||
paths-ignore: | ||
- '.github/workflows/action-tests.yml' | ||
- 'action.yml' | ||
- 'swift' | ||
- 'libexec/**/*' | ||
- 'action-tests/**/*' | ||
|
||
jobs: | ||
tests-with-docker: | ||
name: Tests w/ Docker | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
operating-system: ["ubuntu-latest"] | ||
swift-image-tag: [ | ||
"5.6-bionic", | ||
"5.6-focal", | ||
"5.6-centos7", | ||
"5.5-bionic", | ||
"5.5-focal", | ||
"5.5-centos7", | ||
"5.4-bionic", | ||
"5.4-focal", | ||
"5.4-centos7", | ||
] | ||
runs-on: ${{ matrix.operating-system }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./ | ||
with: | ||
swift-image-tag: ${{ matrix.swift-image-tag }} | ||
args: build --package-path action-tests --product Warning | ||
|
||
tests-without-docker: | ||
name: Tests w/o Docker | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
operating-system: ["ubuntu-18.04", "ubuntu-20.04"] | ||
swift-version: ["5.4.3", "5.5.3", "5.6.2"] | ||
include: | ||
- operating-system: "macos-12" | ||
swift-version: "5.6.2" | ||
xcode-version: "13.4.1" | ||
- operating-system: "macos-12" | ||
swift-version: "5.5.3" | ||
xcode-version: "13.2.1" | ||
- operating-system: "macos-11" | ||
swift-version: "5.4.3" | ||
xcode-version: "12.5.1" | ||
runs-on: ${{ matrix.operating-system }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: sinoru/actions-setup-xcode@v2 | ||
if: ${{ startsWith(runner.os, 'macOS') && matrix.xcode-version }} | ||
with: | ||
xcode-version: ${{ matrix.xcode-version }} | ||
apple-id: ${{ secrets.APPLE_ID }} | ||
apple-id-password: ${{ secrets.APPLE_ID_PASSWORD }} | ||
- uses: ./ | ||
with: | ||
swift-image-tag: null | ||
swift-version: ${{ matrix.swift-version }} | ||
args: build --package-path action-tests --product Warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright (c) 2022 Jaehong Kang | ||
# Licensed under Apache License v2.0 | ||
|
||
name: Unit Tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/unit-tests.yml' | ||
- 'libexec/**/*' | ||
- 'unit-tests/**/*' | ||
pull_request: | ||
paths-ignore: | ||
- '.github/workflows/unit-tests.yml' | ||
- 'libexec/**/*' | ||
- 'unit-tests/**/*' | ||
|
||
jobs: | ||
warning: | ||
name: Warning | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
operating-system: ["ubuntu-latest"] | ||
swift-version: ["5.4.3", "5.5.3", "5.6.2"] | ||
include: | ||
- operating-system: "macos-12" | ||
swift-version: "5.6.2" | ||
xcode-version: "13.4.1" | ||
- operating-system: "macos-12" | ||
swift-version: "5.5.3" | ||
xcode-version: "13.2.1" | ||
- operating-system: "macos-11" | ||
swift-version: "5.4.3" | ||
xcode-version: "12.5.1" | ||
runs-on: ${{ matrix.operating-system }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: diff <(cat unit-tests/warning-source.txt | libexec/github-action-output-handler) unit-tests/warning-expected.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
## [1.0.0] | ||
This is the initial release. | ||
|
||
[Unreleased]: https://github.com/sinoru/swift-snowflake/compare/v1.0.0...HEAD | ||
[1.0.0]: https://github.com/sinoru/swift-snowflake/releases/tag/v1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,47 @@ | ||
# actions-swift | ||
# GitHub Action for Swift | ||
|
||
This action executes [Swift](https://swift.org) and generates github action annotations from swift warnings/errors. | ||
|
||
## Usage | ||
|
||
An example to executing Swift follows: | ||
|
||
```yaml | ||
name: Swift | ||
|
||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/swift.yml' # File path to this yaml | ||
- '**/*.swift' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/swift.yml' # File path to this yaml | ||
- '**/*.swift' | ||
|
||
jobs: | ||
swift-on-docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: sinoru/actions-swift@v1 | ||
with: | ||
swift-image-tag: '5.6' | ||
args: 'build' | ||
- uses: sinoru/actions-swift@v1 | ||
with: | ||
swift-image-tag: '5.6' | ||
args: 'test' | ||
|
||
swift-without-docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: sinoru/actions-swift@v1 | ||
with: | ||
swift-version: '5.6.3' | ||
args: 'build' | ||
- uses: sinoru/actions-swift@v1 | ||
with: | ||
args: 'test' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// swift-tools-version:5.4 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "actions-swift-tests", | ||
dependencies: [ | ||
// Dependencies declare other packages that this package depends on. | ||
// .package(url: /* package url */, from: "1.0.0"), | ||
], | ||
targets: [ | ||
// Targets are the basic building blocks of a package. A target can define a module or a test suite. | ||
// Targets can depend on other targets in this package, and on products in packages this package depends on. | ||
.executableTarget( | ||
name: "Warning", | ||
dependencies: []), | ||
.executableTarget( | ||
name: "Error", | ||
dependencies: []), | ||
.testTarget( | ||
name: "FailTests", | ||
dependencies: []), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# actions-swift-tests | ||
|
||
A description of this package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#error("A error message for tests.") | ||
#error("A error message for tests.") | ||
#error("A error message for tests.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#warning("A warning message for tests.") | ||
#warning("A warning message for tests.") | ||
#warning("A warning message for tests.") |
Oops, something went wrong.