Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ffried committed Mar 29, 2023
1 parent bf49d44 commit 4ae9ca2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 29 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ on:
- published
- edited
push:
branches: [ master ]
branches: [ main ]

jobs:
release-context:
runs-on: ubuntu-latest
outputs:
version-name: ${{ github.ref_name }}
is-latest: ${{ steps.compare-tags.output.is-latest }}
is-latest: ${{ steps.compare-tags.outputs.is-latest }}
steps:
- uses: joutvhu/get-release@v1.0.2
- uses: joutvhu/get-release@v1
id: latest-release
with:
latest: true
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
- uses: swift-actions/[email protected]
with:
swift-version: '5.7'
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v3
# We don't use a cache here, because SPM doesn't resolve dependencies when dumping packages.
- name: Dump package
id: dump-package
Expand All @@ -67,16 +67,16 @@ jobs:
with:
swift-version: '5.7'
- name: Read OS Version
uses: sersoft-gmbh/os-version-action@v2.0.1
uses: sersoft-gmbh/os-version-action@v2
id: os-version
- uses: actions/checkout@v3.5.0
- uses: actions/cache@v3.3.1
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: .build
key: ${{ runner.os }}-${{ steps.os-version.outputs.version }}-spm-${{ steps.swift-setup.outputs.version }}-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-${{ steps.os-version.outputs.version }}-spm-${{ steps.swift-setup.outputs.version }}-
- uses: sersoft-gmbh/swifty-docs-action@v2.0.3
- uses: sersoft-gmbh/swifty-docs-action@v2
env:
ENABLE_DOCC_SUPPORT: '1'
DOCC_JSON_PRETTYPRINT: 'YES'
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
- generate-docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v3
with:
ref: gh-pages
path: repository
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
else
echo 'has-changes=false' >> "${GITHUB_OUTPUT}"
fi
- uses: crazy-max/ghaction-github-pages@v3.1.0
- uses: crazy-max/ghaction-github-pages@v3
if: ${{ steps.check-changes.outputs.has-changes }}
with:
keep_history: true
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/enable-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
enable-auto-merge:
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/swift-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Tests

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
test-spm:
Expand All @@ -25,24 +25,24 @@ jobs:

steps:
- if: ${{ runner.os == 'macOS' }}
uses: maxim-lobanov/setup-xcode@v1.5.1
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode-version }}
- name: Install Swift
if: ${{ runner.os == 'Linux' }}
uses: sersoft-gmbh/swifty-linux-action@v2.1.1
uses: sersoft-gmbh/swifty-linux-action@v2
with:
release-version: ${{ matrix.swift-version }}
platform: ${{ matrix.os }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Read OS Version
uses: sersoft-gmbh/os-version-action@v2.0.1
uses: sersoft-gmbh/os-version-action@v2
id: os-version
- name: Read Swift Version
uses: sersoft-gmbh/swift-version-action@v2.0.1
uses: sersoft-gmbh/swift-version-action@v2
id: swift-version
- uses: actions/checkout@v3.5.0
- uses: actions/cache@v3.3.1
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: .build
key: ${{ runner.os }}-${{ steps.os-version.outputs.version }}-spm-${{ steps.swift-version.outputs.version }}-${{ hashFiles('**/Package.resolved') }}
Expand All @@ -51,9 +51,9 @@ jobs:
- name: Build & Test
run: swift test -v --parallel --enable-code-coverage
- name: Generate Coverage Files
uses: sersoft-gmbh/swift-coverage-action@v3.0.1
uses: sersoft-gmbh/swift-coverage-action@v3
id: coverage-files
- uses: codecov/codecov-action@v3.1.1
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }}
Expand All @@ -68,14 +68,14 @@ jobs:
env:
XCODE_SCHEME: route-docs
steps:
- uses: maxim-lobanov/setup-xcode@v1.5.1
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ^14.1
- name: Read OS Version
uses: sersoft-gmbh/os-version-action@v2.0.1
uses: sersoft-gmbh/os-version-action@v2
id: os-version
- name: Read Swift Version
uses: sersoft-gmbh/swift-version-action@v2.0.1
uses: sersoft-gmbh/swift-version-action@v2
id: swift-version
- name: Select destination
id: destination
Expand All @@ -92,9 +92,9 @@ jobs:
*) echo "::error title=Unknown platform!::Unknown platform: ${PLATFORM}" && exit 1;;
esac
echo "xcode=${DESTINATION}" >> "${GITHUB_OUTPUT}"
- uses: actions/checkout@v3.5.0
- uses: actions/checkout@v3
# PIF ISSUES: https://github.com/apple/swift-package-manager/issues/5767
- uses: actions/cache@v3.3.1
- uses: actions/cache@v3
with:
path: .build
key: ${{ runner.os }}-${{ steps.os-version.outputs.version }}-spm-${{ steps.swift-version.outputs.version }}-${{ hashFiles('**/Package.resolved') }}
Expand All @@ -111,13 +111,13 @@ jobs:
ATTEMPT=$((ATTEMPT + 1))
done
# END PIF ISSUES
- uses: actions/cache@v3.3.1
- uses: actions/cache@v3
with:
path: .derived-data
key: ${{ runner.os }}-${{ steps.os-version.outputs.version }}-xcode-${{ steps.swift-version.outputs.version }}-${{ matrix.platform }}-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-${{ steps.os-version.outputs.version }}-xcode-${{ steps.swift-version.outputs.version }}-${{ matrix.platform }}-
- uses: sersoft-gmbh/xcodebuild-action@v2.0.1
- uses: sersoft-gmbh/xcodebuild-action@v2
with:
spm-package: './'
scheme: ${{ env.XCODE_SCHEME }}
Expand All @@ -126,14 +126,14 @@ jobs:
parallel-testing-enabled: ${{ matrix.platform != 'watchOS' }}
enable-code-coverage: true
derived-data-path: .derived-data
- uses: sersoft-gmbh/swift-coverage-action@v3.0.1
- uses: sersoft-gmbh/swift-coverage-action@v3
id: coverage-files
with:
search-paths: |
./.build
./.derived-data
$HOME/Library/Developer/Xcode/DerivedData
- uses: codecov/codecov-action@v3.1.1
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }}
Expand Down

0 comments on commit 4ae9ca2

Please sign in to comment.