Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.25.0: Rework CI and Contributions #90

Merged
merged 48 commits into from
Jun 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
57566a2
Update Dangerfile with comments and to perform more tests
Samasaur1 Oct 17, 2020
e0de1a5
Make PR template easier to follow
Samasaur1 Oct 17, 2020
be7169b
Rework CI
Samasaur1 Oct 17, 2020
f9721e6
Add Package.resolved.danger
Samasaur1 Oct 17, 2020
6edd65b
Fix GitHub Actions PR trigger
Samasaur1 Oct 17, 2020
b09d1f3
Don't test 5.3 on ubuntu-latest
Samasaur1 Oct 17, 2020
ad2a097
Skip Swift 5.2 on macOS and fix Hound complaints
Samasaur1 Oct 31, 2020
0d6580d
Update Dangerfile for new behavior
Samasaur1 Oct 31, 2020
eb649bc
Fix misspelling and read full Jazzy version
Samasaur1 Oct 31, 2020
7bc2f92
Include Swift 5.2 on macOS
Samasaur1 Oct 31, 2020
684ee95
Use both Danger tokens
Samasaur1 Oct 31, 2020
5a5d014
Run Danger as two separate jobs
Samasaur1 Oct 31, 2020
b9a231a
Build danger-swift before running
Samasaur1 Oct 31, 2020
4ab8a1e
Explicitly use GitHub checks
Samasaur1 Nov 1, 2020
4c59b4d
Use current versions of Swift and OSs
Samasaur1 Jun 2, 2022
74a5c79
Temporarily disable multiple Swift versions
Samasaur1 Jun 2, 2022
1e25663
Actually disable Swift versions
Samasaur1 Jun 2, 2022
905ff18
Disable Ubuntu 22.04
Samasaur1 Jun 2, 2022
7c3e4b3
Try to use Danger
Samasaur1 Jun 2, 2022
929519e
Fix Danger workflow file
Samasaur1 Jun 2, 2022
af41743
Add github token to Danger
Samasaur1 Jun 3, 2022
bb95b8e
Use prebundled version of Swift to try and avoid inconsistency
Samasaur1 Jun 3, 2022
44a9a53
Use Swift 5.3 for Danger
Samasaur1 Jun 3, 2022
b54977d
Re-add workflow files that I apparently deleted?
Samasaur1 Jun 3, 2022
3e6e6d1
Run Danger on macOS 10.15
Samasaur1 Jun 3, 2022
cb3389b
Try GitHub Action adn test all matrix combos
Samasaur1 Jun 3, 2022
3d7356c
Try using specific Danger version
Samasaur1 Jun 3, 2022
02769b7
Use Danger action on Linux
Samasaur1 Jun 3, 2022
5305494
Add separate deploy docs workflow
Samasaur1 Jun 3, 2022
2012e0e
Remove Travis, add release deployment, update version and tests
Samasaur1 Jun 3, 2022
d5a26e8
Update CHANGELOG
Samasaur1 Jun 3, 2022
eeb3354
Fix compare link
Samasaur1 Jun 3, 2022
631fb3f
Hopefully fix Danger task listing
Samasaur1 Jun 3, 2022
414b3b7
Try to debug Dangerfile
Samasaur1 Jun 3, 2022
e0516c1
Fix tests workflow
Samasaur1 Jun 3, 2022
6e6ff11
Add test summary to job summary
Samasaur1 Jun 3, 2022
393aec9
Fix test workflow
Samasaur1 Jun 3, 2022
b39f69e
Only use fancy test statuses on Ubuntu
Samasaur1 Jun 4, 2022
622b629
We can still have somewhat-nice statuses
Samasaur1 Jun 4, 2022
2c3d4f2
Try to fix test workflow (again)
Samasaur1 Jun 4, 2022
048de4c
Fix test workflow
Samasaur1 Jun 4, 2022
0000ec5
Is this the problem?
Samasaur1 Jun 4, 2022
6de5054
Ah, it was a YAML error
Samasaur1 Jun 4, 2022
8e5ced8
Force the use of emdashes in CHANGELOG
Samasaur1 Jun 4, 2022
1e2f077
Escape square brackets in regex
Samasaur1 Jun 4, 2022
7cacf27
Forcibly correct CHANGELOG entry headings
Samasaur1 Jun 4, 2022
4354e5d
Clean up PR template
Samasaur1 Jun 4, 2022
f1a42eb
It's perfectly fine for a PR not to have any tasks
Samasaur1 Jun 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
---
name: PR to master
about: Merging development into master
title: 'Version $VERSION: $DESCRIPTION'
labels: needs-labeling
assignees: ''
If you are merging to a non-`master` branch, I assume you know what you are doing. Most PRs should be made to `master`.

---
If you are merging to `master`, you have two options: explicitly say that these changes constitute a "new version" (you probably don't want to do that, and I will walk you through it if that is what you should be doing), or just merge your changes in to `master` and they will be released when I determine it is time for a new version.

Assuming you are not merging as a new version:
1. Fill in the list below with your changes, referring to issues when appropriate (https://docs.github.com/articles/closing-issues-using-keywords).
1. Fill in any information you want to share, if you have any. Otherwise, remove that line.
1. Change the task list below to contain any tasks you need to complete before this PR can be merged.
1. You can now delete these instructions, so that "Here's what's new" is the first line of your PR body.

Here's what's new:
- A
- List
- Of
- Items

Any other information you want to share here

Here's what has to happen:
- [ ] Anything
- [ ] Specific
- [ ] This
- [ ] PR
- [ ] Ensure the changelog has everything new that is being added
- [ ] Bump version (run `updateVersion.sh`)
1. Wait for CI
1. Merge
1. Run `release.sh`
17 changes: 17 additions & 0 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: danger

# Controls when the action will run. This action runs Danger, so run on PRs only
on: pull_request

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
name: Run Danger
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: danger/swift@3.12.3
with:
args: --use-github-checks --verbose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61 changes: 61 additions & 0 deletions .github/workflows/deploydocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Deploy

on:
push:
tags: 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
deploy-docs:
name: Deploy Docs
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: swift-actions/setup-swift@v1
- run: swift --version
- name: Install jazzy
run: gem install jazzy
- name: Run jazzy
run: jazzy -o newdocs
- name: Checkout gh-pages
uses: actions/checkout@v3
with:
ref: gh-pages
path: ghp
- name: Determine VERSION
run: echo 'VERSION=${GITHUB_REF:#refs/tags/v}' >> $GITHUB_ENV #lops of that part from the beginning of the string, could be ${GITHUB_REF:11} to chop off 11 characters
- name: Process docs
run: |
mkdir ghp/docs/v$VERSION
mv newdocs/* ghpd/docs/v$VERSION
cd ghp
echo 'section > section > p > img { margin-top: 4em; margin-right: 2em; }' >> docs/v$VERSION/css/jazzy.css
bash ../scripts/updateLatestDocs.sh $VERSION
cd ..
- name: Push updated docs
run: |
cd ghp
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Add documentation for version $VERSION"
git push
deploy-release:
name: Deploy Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Determine VERSION
run: echo 'VERSION=${GITHUB_REF:#refs/tags/v}' >> $GITHUB_ENV #lops of that part from the beginning of the string, could be ${GITHUB_REF:11} to chop off 11 characters
- name: Determine release name
run: |
NAME=$(git tag -l --format='%(contents)' v$VERSION | head -n 1)
echo "NAME='$NAME'" >> $GITHUB_ENV
echo "Determined release name as '$NAME'" >> $GITHUB_STEP_SUMMARY
- name: Determine release body (from CHANGELOG)
run: cat CHANGELOG.md | sed '1,/^## /d' | sed '1,/^## /d' | sed '/^## /,$d' | tee body.md
- uses: ncipollo/release-action@v1.10.0
with:
name: ${{ env.NAME }}
bodyFile: "body.md"
draft: true
prerelease: true
53 changes: 0 additions & 53 deletions .github/workflows/pr.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/push-master.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/push-nonmaster.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: tests

# Controls when the action will run. Since this action runs only tests, run on pushes and PRs
on: [push, pull_request]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
name: Test Swift ${{ matrix.swift }}.x on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-10.15, macos-11, macos-12, ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
#os: [macos-10.15, macos-11, macos-12, ubuntu-18.04, ubuntu-20.04]
swift: ["4.2", "5.0", "5.1", "5.2", "5.3", "5.4", "5.5", "5.6"] #setup-swift finds the latest bug fix version
exclude:
- os: macos-10.15
swift: "4.2"
- os: macos-10.15
swift: "5.1"
- os: macos-10.15
swift: "5.2"
- os: macos-11 #the vast majority of these fail, so we exclude the OS and include the specific Swift versions
- os: macos-12
- os: ubuntu-20.04
swift: "4.2"
- os: ubuntu-20.04
swift: "5.0"
- os: ubuntu-20.04
swift: "5.1"
- os: ubuntu-22.04 #Not supported by setup-swift
include:
- os: macos-11
swift: "5.5"
- os: macos-11
swift: "5.6"
- os: macos-12
swift: "5.5"
- os: macos-12
swift: "5.6"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: swift-actions/setup-swift@v1
with:
swift-version: ${{ matrix.swift }}
- run: |
swift --version
echo "Using \`$(swift --version | head -n 1)\`" >> $GITHUB_STEP_SUMMARY
- run: swift test --parallel --xunit-output output.xml
if: startsWith(matrix.os, 'ubuntu')
- run: swift test
if: startsWith(matrix.os, 'macos')
- uses: test-summary/action@v1
if: always() && startsWith(matrix.os, 'ubuntu')
with:
paths: output.xml
show: fail #none | all | (fail)?,(pass)?,(skip)?
- run: 'echo ":white_check_mark: Tests succeeded!" >> $GITHUB_STEP_SUMMARY'
if: ${{ success() && startsWith(matrix.os, 'macos') }}
- run: 'echo ":x: Some tests failing!" >> $GITHUB_STEP_SUMMARY' #perhaps :heavy_exclamation_mark:
if: ${{ failure() && startsWith(matrix.os, 'macos') }}
4 changes: 2 additions & 2 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ clean: true
author: Samasaur
author_url: https://github.com/Samasaur1
module: DiceKit
module_version: 0.24.1
module_version: 0.25.0
# docset_icon:
github_url: https://github.com/Samasaur1/DiceKit
# github_file_prefix:
Expand All @@ -27,4 +27,4 @@ custom_categories:
- Chances
- Chance
- Caching
- ENABLE_CACHING
- ENABLE_CACHING
74 changes: 0 additions & 74 deletions .travis.yml

This file was deleted.

Loading