Skip to content

Commit

Permalink
Update and clean up workflow and include coverage for the Musl run
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynne authored Jun 14, 2024
1 parent 533723c commit 0d94354
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,35 @@ jobs:

integration-check:
runs-on: ubuntu-latest
container: swift:jammy
container: swift:noble
steps:
- uses: actions/checkout@v4
with: { path: console-kit }
- uses: actions/checkout@v4
with: { repository: 'vapor/vapor', path: vapor }
- run: swift package --package-path vapor edit console-kit --path console-kit
- run: swift test --package-path vapor
- run: SWIFT_DETERMINISTIC_HASHING=1 swift test --package-path vapor

test-musl:
musl-unit:
runs-on: ubuntu-latest
container: archlinux
container: archlinux:latest
steps:
- uses: actions/checkout@v4
- run: |
- name: Check out code
uses: actions/checkout@v4
- name: Install latest Swift from AUR
run: |
# https://www.reddit.com/r/archlinux/comments/6qu4jt/comment/dl1t5m9/
pacman -Sy --needed --noconfirm sudo git base-devel patchelf
useradd builduser -m
passwd -d builduser
printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers
sudo -u builduser bash -c 'cd ~ && git clone https://aur.archlinux.org/swift-bin.git && cd swift-bin && makepkg -si --noconfirm swift-bin'
- run: SWIFT_DETERMINISTIC_HASHING=1 swift test
useradd builduser -m && passwd -d builduser && echo 'builduser ALL=(ALL) ALL' >> /etc/sudoers
sudo -u builduser bash -c \
'cd ~ && git clone https://aur.archlinux.org/swift-bin.git && cd swift-bin && makepkg -si --noconfirm swift-bin'
- name: Run unit tests
run: |
SWIFT_DETERMINISTIC_HASHING=1 \
swift test \
--sanitize=thread \
--enable-code-coverage
- name: Upload coverage data
uses: vapor/[email protected]
with:
codecov_token: ${{ secrets.CODECOV_TOKEN || '' }}

0 comments on commit 0d94354

Please sign in to comment.