Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python 3.12, Ruby 2.7, Node.js 16, Java 17, .NET 8, Go 1.21, Swift, Dart, allure | |
# on: [push] | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# # ruby-version: ['2.6', '2.7', '3.0'] | |
# ruby-version: ['2.7'] | |
# # node-version: [10.x, 12.x, 14.x, 15.x, 16.x] | |
# node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v3 | |
python: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/allure-prep | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
# - name: Lint with flake8 | |
# run: | | |
# flake8 . | |
- name: Lint with black | |
run: | | |
black . | |
- name: Test with pytest | |
if: always() | |
run: | | |
pwd | |
pytest --alluredir=allure-results | |
# - name: Analysing the code with pylint | |
# run: | | |
# pylint `ls -R|grep .py$|xargs` | |
- name: Look at Allure | |
if: always() | |
uses: ./.github/actions/allure-show | |
# TODO: de-duplicate | |
- name: Archive Allure results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: allure-results | |
path: allure-results | |
# - name: Archive Allure reports | |
# if: always() | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: allure-reports | |
# path: allure-reports | |
ruby: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
# ruby-version: ['2.6', '2.7', '3.0'] | |
ruby-version: ['2.7'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/allure-prep | |
- name: Experimental installation | |
if: always() | |
run: | | |
rm Gemfile.lock | |
# bundle install | |
- name: Set up Ruby | |
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | |
# change this to (see https://github.com/ruby/setup-ruby#versioning): | |
# uses: ruby/setup-ruby@v1 | |
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e | |
if: always() | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
# - name: Experimental installation | |
# if: always() | |
# run: | | |
# rm Gemfile.lock | |
# bundle install | |
- name: Run tests | |
if: always() | |
run: bundle exec rake | |
- name: Look at Allure | |
if: always() | |
uses: ./.github/actions/allure-show | |
# TODO: de-duplicate | |
- name: Archive Allure results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: allure-results | |
path: allure-results | |
# - name: Archive Allure reports | |
# if: always() | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: allure-reports | |
# path: allure-reports | |
node: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
# node-version: [10.x, 12.x, 14.x, 15.x, 16.x] | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/allure-prep | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
if: always() | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
- run: npm run build --if-present | |
- run: npm test | |
# - run: find -name '*.test.js' | while read test ; do echo $test ; npm test $test ; done | |
- name: Look at Allure | |
if: always() | |
uses: ./.github/actions/allure-show | |
# TODO: de-duplicate | |
- name: Archive Allure results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: allure-results | |
path: allure-results | |
# - name: Archive Allure reports | |
# if: always() | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: allure-reports | |
# path: allure-reports | |
golang: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/allure-prep | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
if: always() | |
with: | |
go-version: 1.21 | |
- name: Build | |
if: always() | |
run: | | |
go get github.com/onsi/ginkgo/ginkgo | |
go get github.com/onsi/gomega/... | |
go get -u github.com/dailymotion/allure-go | |
export ALLURE_RESULTS_PATH=allure-results | |
GCO_ENABLED=0 | |
go mod vendor | |
echo "PWD" | |
echo $PWD | |
echo "GOPATH" | |
echo $GOPATH | |
echo "GOROOT" | |
echo $GOROOT | |
echo "ALLURE_RESULTS_PATH=$PWD" > "$PWD/variables.env" | |
go build -v ./... | |
- name: Test | |
if: always() | |
run: go test -v ./... | |
- name: Look at Allure | |
if: always() | |
uses: ./.github/actions/allure-show | |
# TODO: de-duplicate | |
- name: Archive Allure results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: allure-results | |
path: allure-results | |
# - name: Archive Allure reports | |
# if: always() | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: allure-reports | |
# path: allure-reports | |
jdk: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/allure-prep | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
if: always() | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Run check style | |
uses: nikitasavinov/checkstyle-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
reporter: 'github-pr-check' | |
tool_name: 'testtool' | |
- name: Gradle wrapper | |
if: always() | |
run: gradle wrapper | |
- name: Print Gradle version | |
if: always() | |
run: gradle --version | |
- name: Grant execute permission for gradlew | |
if: always() | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
if: always() | |
run: ./gradlew build --warning-mode all | |
- name: Look at Allure | |
if: always() | |
uses: ./.github/actions/allure-show | |
# TODO: de-duplicate | |
- name: Archive Allure results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: allure-results | |
path: allure-results | |
# - name: Archive Allure reports | |
# if: always() | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: allure-reports | |
# path: allure-reports | |
# dotnet-format: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout repo | |
# uses: actions/checkout@v3 | |
# - name: Add dotnet-format problem matcher | |
# uses: xt0rted/dotnet-format-problem-matcher@v1 | |
# - name: Restore dotnet tools | |
# uses: xt0rted/dotnet-tool-restore@v1 | |
# - name: Run dotnet format | |
# uses: xt0rted/dotnet-format@v1 | |
# with: | |
# version: 5 | |
# repo-token: ${{ secrets.GITHUB_TOKEN }} | |
dotnet: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
# - dotnet-format | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/allure-prep | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
# - name: Install dotnet-format | |
# run: | | |
# dotnet tool uninstall dotnet-format | |
# dotnet tool install dotnet-format --version "7.*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json | |
# - name: Restore dotnet tools | |
# run: dotnet tool restore | |
- name: Check formatting | |
run: dotnet format --verify-no-changes -v d | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Test | |
run: dotnet test --no-build --verbosity normal | |
- name: Look at Allure | |
if: always() | |
uses: ./.github/actions/allure-show | |
# TODO: de-duplicate | |
- name: Archive Allure results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: allure-results | |
path: allure-results | |
# - name: Archive Allure reports | |
# if: always() | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: allure-reports | |
# path: allure-reports | |
swift: | |
runs-on: macos-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: swift build -v | |
- name: Run tests | |
run: swift test -v | |
- name: Look at Allure | |
if: always() | |
uses: ./.github/actions/allure-show | |
# TODO: de-duplicate | |
- name: Archive Allure results | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: allure-results | |
path: allure-results | |
dart: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
# Note: This workflow uses the latest stable version of the Dart SDK. | |
# You can specify other versions if desired, see documentation here: | |
# https://github.com/dart-lang/setup-dart/blob/main/README.md | |
# - uses: dart-lang/setup-dart@v1 | |
- uses: dart-lang/setup-dart@v1 | |
- name: Install dependencies | |
run: dart pub get | |
# Uncomment this step to verify the use of 'dart format' on each commit. | |
# - name: Verify formatting | |
# run: dart format --output=none --set-exit-if-changed . | |
# Consider passing '--fatal-infos' for slightly stricter analysis. | |
- name: Analyze project source | |
run: dart analyze | |
# Your project will need to have tests in test/ and a dependency on | |
# package:test for this step to succeed. Note that Flutter projects will | |
# want to change this to 'flutter test'. | |
- name: Run tests | |
# run: dart test | |
if: always() | |
# run: find -name '*_test.dart' | { read test; echo $test; pub run test $test; } | |
# run: find -name '*_test.dart' | while read test ; do echo $test ; pub run test $test ; done | |
run: find -name '*_test.dart' | while read test ; do echo $test ; dart run test $test ; done | |
# Allure is not yet supported | |
# - name: Look at Allure | |
# if: always() | |
# uses: ./.github/actions/allure-show | |
# # TODO: de-duplicate | |
# - name: Archive Allure results | |
# if: always() | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: allure-results | |
# path: allure-results | |
allure: | |
runs-on: ubuntu-latest | |
if: always() | |
needs: | |
# - build | |
- python | |
- ruby | |
- node | |
- golang | |
- jdk | |
- dotnet | |
- swift | |
- dart | |
steps: | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v2 | |
- name: Get Allure history | |
uses: actions/checkout@v3 | |
if: always() | |
continue-on-error: true | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- name: Allure Report with history | |
uses: simple-elf/[email protected] | |
if: always() | |
- name: Allure Report action from marketplace | |
uses: simple-elf/allure-report-action@master | |
if: always() | |
#id: allure-report | |
with: | |
allure_results: allure-results | |
gh_pages: gh-pages | |
allure_report: allure-report | |
allure_history: allure-history | |
keep_reports: 50 | |
- name: Deploy report to Github Pages | |
if: always() | |
uses: peaceiris/actions-gh-pages@v2 | |
env: | |
PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PUBLISH_BRANCH: gh-pages | |
PUBLISH_DIR: allure-history | |
# dotnet-format: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout repo | |
# uses: actions/checkout@v3 | |
# - name: Add dotnet-format problem matcher | |
# uses: xt0rted/dotnet-format-problem-matcher@v1 | |
# - name: Restore dotnet tools | |
# uses: xt0rted/dotnet-tool-restore@v1 | |
# - name: Run dotnet format | |
# uses: xt0rted/dotnet-format@v1 | |
# with: | |
# repo-token: ${{ secrets.GITHUB_TOKEN }} |