Skip to content

Bump all dependencies reported by Dependabot #236

Bump all dependencies reported by Dependabot

Bump all dependencies reported by Dependabot #236

Workflow file for this run

name: Testing
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
cancel-previous-workflows:
name: Cancel previous workflows
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
# https://github.com/styfle/cancel-workflow-action#advanced-token-permissions
permissions:
actions: write
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5
with:
access_token: ${{ github.token }}
unit-test:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{matrix.os}}
steps:
- name: "Set git to use LF"
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: "Checkout code"
uses: actions/checkout@v3
- name: "Set up Go"
uses: actions/setup-go@v3
with:
go-version: '1.19.4' # must be hardcoded as it's expected in tests
cache: true
- uses: szenius/set-timezone@d1416e74a9a643cbf6c711905741e73e3a0c26b8
with:
timezoneLinux: "Europe/Warsaw"
timezoneMacos: "Europe/Warsaw"
timezoneWindows: "Central European Standard Time"
- name: "Unit tests"
uses: magefile/mage-action@3b833fb24c0d19eed3aa760b9eb285b4b84f420f
with:
version: latest
args: test:unit
e2e-test:
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
runs-on: ${{matrix.os}}
steps:
- name: "Set git to use LF"
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: "Checkout code"
uses: actions/checkout@v3
- name: "Set up Go"
uses: actions/setup-go@v3
with:
go-version: '1.19.4' # must be hardcoded as it's expected in tests
cache: true
- uses: szenius/set-timezone@d1416e74a9a643cbf6c711905741e73e3a0c26b8
with:
timezoneLinux: "Europe/Warsaw"
timezoneMacos: "Europe/Warsaw"
timezoneWindows: "Central European Standard Time"
- name: "E2E tests"
uses: magefile/mage-action@3b833fb24c0d19eed3aa760b9eb285b4b84f420f
with:
version: latest
args: test:e2e
documentation-sanity:
name: Check documentation
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v3
- name: "Set up Go"
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
- uses: actions/setup-python@v4
with:
python-version: 3.x # for mkdocs
- name: "Format *.md files"
uses: magefile/mage-action@3b833fb24c0d19eed3aa760b9eb285b4b84f420f
with:
version: latest
args: docs:check
- name: "Detect git changes"
if: always()
run: |
if [[ $(git diff --stat) != '' ]]; then
echo -e '❌ \033[0;31m. Run 'mage docs:fmt'.\033[0m'
git diff --color
exit 1
else
echo '✔ No issues detected. Have a nice day :-)'
fi
dead-links-checker:
name: Check for dead links
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v3
- name: "Set up Go"
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
- uses: actions/setup-python@v4
with:
python-version: 3.x # for mkdocs
- name: "Check links for homepage"
uses: magefile/mage-action@3b833fb24c0d19eed3aa760b9eb285b4b84f420f
with:
version: latest
args: -v docs:checkDeadLinks 10s
- name: "(Hack) remove the homepage custom page"
if: always()
run: echo "" > ./docs/index.md
- name: "Check links for the whole site"
if: always()
uses: magefile/mage-action@3b833fb24c0d19eed3aa760b9eb285b4b84f420f
with:
version: latest
args: -v docs:checkDeadLinks 10s
language-check:
name: Check documentation language and grammar
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v3
# It doesn't work well on CI
#- uses: reviewdog/action-languagetool@v1
# with:
# github_token: ${{ secrets.github_token }}
# # Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
# reporter: github-check
# # Change reporter level if you need.
# level: info
- name: misspell
uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.github_token }}
locale: "US"
code-quality-test:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{matrix.os}}
steps:
- name: "Checkout code"
uses: actions/checkout@v3
- name: "Set up Go"
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
cache: true
- name: "Check code quality"
uses: magefile/mage-action@3b833fb24c0d19eed3aa760b9eb285b4b84f420f
with:
version: latest
args: lint
- name: "Detect git changes"
if: always()
run: |
if [[ $(git diff --stat) != '' ]]; then
echo -e '❌ \033[0;31m. Run 'mage docs:fmt'.\033[0m'
git diff --color
exit 1
else
echo '✔ No issues detected. Have a nice day :-)'
fi