Skip to content

Ignore Nightly Failures #162

Ignore Nightly Failures

Ignore Nightly Failures #162

Workflow file for this run

name: tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request: { types: [opened, reopened, synchronize] }
push: { branches: [main] }
jobs:
tests:
strategy:
fail-fast: false
matrix:
swift-image:
- name: swift:5.10-noble
error-sign: -

Check failure on line 16 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 16
- name: swift:6.0-noble
error-sign: -
- name: swiftlang/swift:nightly-main-jammy
# https://github.com/swiftlang/swift/issues/77242
error-sign: +
config:
- mode: "debug"
build_args: ""
test_args: "--enable-code-coverage"
with_codecov: true
- mode: "release"
build_args: "-Xswiftc -enable-testing"
test_args: "-Xswiftc -enable-testing"
with_codecov: false
runs-on: ubuntu-latest
container: ${{ matrix.swift-image.name }}
timeout-minutes: 30
steps:
- name: Check out ${{ github.event.repository.name }}
uses: actions/checkout@v4
- name: Restore .build
id: "restore-cache"
uses: actions/cache/restore@v4
with:
path: .build
# e.g. 'enumerator-macro-debug-build-swiftlang/swift:nightly-6.0-jammy-Linux-c7008df8062ac4d5887ead9e59aa05829e'
key: "${{ github.event.repository.name }}-${{ matrix.config.mode }}-build-${{ matrix.swift-image.name }}-${{ runner.os }}-${{ hashFiles('./Package.resolved') }}"
restore-keys: "${{ github.event.repository.name }}-${{ matrix.config.mode }}-build-${{ matrix.swift-image.name }}-${{ runner.os }}-"
- name: Build ${{ github.event.repository.name }}
run: swift build --build-tests -c ${{ matrix.config.mode }} ${{ matrix.config.build_args }}
- name: Cache .build
if: steps.restore-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: .build
key: "${{ github.event.repository.name }}-${{ matrix.config.mode }}-build-${{ matrix.swift-image.name }}-${{ runner.os }}-${{ hashFiles('./Package.resolved') }}"
- name: Run tests
run:
set ${{ matrix.swift-image.error-sign }}e
swift test --parallel -c ${{ matrix.config.mode }} ${{ matrix.config.test_args }}
- name: Submit code coverage
if: matrix.config.with_codecov
uses: vapor/swift-codecov-action@v0.3
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}