|
1 | | -name: CI |
2 | | - |
| 1 | +name: Тестирование |
3 | 2 | on: |
4 | 3 | push: |
5 | 4 | pull_request: |
6 | | - schedule: |
7 | | - # * is a special character in YAML so you have to quote this string |
8 | | - - cron: '0 0 * * 1' |
9 | | - |
| 5 | + workflow_dispatch: |
10 | 6 | jobs: |
11 | | - build: |
12 | | - runs-on: ${{ matrix.os }} |
| 7 | + test: |
13 | 8 | strategy: |
14 | 9 | fail-fast: false |
15 | 10 | matrix: |
16 | | - os: [ubuntu-latest, windows-latest, macos-latest] |
17 | | - oscript_version: ['stable', '1.8.4'] |
18 | | - |
19 | | - steps: |
20 | | - - uses: actions/checkout@v2 |
21 | | - |
22 | | - - name: Setup Onescript Action |
23 | | - uses: otymko/setup-onescript@v1.1 |
24 | | - with: |
25 | | - version: ${{ matrix.oscript_version }} |
26 | | - |
27 | | - - name: Install dependencies |
28 | | - run: | |
29 | | - opm install opm |
30 | | - opm install 1testrunner; |
31 | | - opm install 1bdd; |
32 | | - opm install coverage; |
33 | | - opm install -l --dev |
34 | | -
|
35 | | - - name: Compute branch name |
36 | | - uses: nelonoel/branch-name@v1.0.1 |
37 | | - |
38 | | - - name: Run tests |
39 | | - run: | |
40 | | - oscript ./tasks/coverage.os |
41 | | -
|
42 | | - - name: SonarCloud Scan on push |
43 | | - if: github.repository == 'oscript-library/opm' && github.event_name == 'push' && matrix.os == 'ubuntu-latest' && matrix.oscript_version == 'stable' |
44 | | - uses: nixel2007/sonarcloud-github-action@v1.4 |
45 | | - env: |
46 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
47 | | - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
48 | | - with: |
49 | | - args: > |
50 | | - -Dsonar.host.url=https://sonar.openbsl.ru |
51 | | - -Dsonar.branch.name=${{ env.BRANCH_NAME }} |
52 | | - |
53 | | - - name: SonarCloud Scan on PR |
54 | | - if: github.repository == 'oscript-library/opm' && github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' && matrix.oscript_version == 'stable' |
55 | | - uses: nixel2007/sonarcloud-github-action@v1.4 |
56 | | - env: |
57 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
58 | | - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
59 | | - with: |
60 | | - args: > |
61 | | - -Dsonar.host.url=https://sonar.openbsl.ru |
62 | | - -Dsonar.pullrequest.key=${{ github.event.pull_request.number }} |
63 | | - -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} |
64 | | - -Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} |
65 | | - -Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} |
| 11 | + oscript_version: ['stable', 'default'] |
| 12 | + uses: autumn-library/workflows/.github/workflows/test.yml@main |
| 13 | + with: |
| 14 | + oscript_version: ${{ matrix.oscript_version }} |
0 commit comments