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

cleanup test.yml #9

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
82 changes: 62 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,73 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os:
- ubuntu-latest
# - macos-latest
- windows-latest
release:
- '10.3-2021.10'
- '10.3-2021.07'
- '10-2021.10'
- '10-2021.07'
- '10-2020-q4'
- '9-2020-q2'
- '9-2019-q4'
- '8-2019-q3'
- '8-2018-q4'
- '7-2018-q2'
- '7-2017-q4'
- '6-2017-q2'
- '6-2017-q1'
- '6-2016-q4'
- '5-2016-q3'
- '5-2016-q2'
- '5-2016-q1'
- '5-2015-q4'
# - '10-2021.10'
# - '10-2021.07'
# - '10-2020-q4'
# - '9-2020-q2'
# - '9-2019-q4'
# - '8-2019-q3'
# - '8-2018-q4'
# - '7-2018-q2'
# - '7-2017-q4'
# - '6-2017-q2'
# - '6-2017-q1'
# - '6-2016-q4'
# - '5-2016-q3'
# - '5-2016-q2'
# - '5-2016-q1'
# - '5-2015-q4'

name: Test @ ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: ./
- name: Checkout repository
uses: actions/checkout@v3

- name: Compiler releases
uses: ./
with:
release: ${{ matrix.release }}
- run: arm-none-eabi-gcc -v

- name: Compiler check
id: check
run: |
arm-none-eabi-gcc -v

- name: Generate summary
uses: actions/github-script@v6
with:
script: |
const output = \`{{ steps.check.outcome }}\`;
await core.summary
.addHeading('Results')
.addTable([
[{data: 'OS', header: true}, {data: 'Release', header: true}, {data: 'Results', header: true}],
['Linux', output, 'Pass'],
])
.write()

# - name: Summary
# uses: actions/github-script@v6
# with:
# script: |
# import * as core from '@actions/core' \
# .addHeading('Test Results') \
# .addCodeBlock(generateTestResults(), "js") \
# .addTable([ \
# [{data: 'File', header: true}, {data: 'Result', header: true}], \
# ['foo.js', 'Pass ✅'], \
# ['bar.js', 'Fail ❌'], \
# ['test.js', 'Pass ✅'] \
# ]) \
# await core.summary \
# .addLink('View staging deployment!', 'https://github.com') \
# .write() \
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
"bracketSpacing": false,
"arrowParens": "avoid",
"parser": "typescript"
}
}
4 changes: 2 additions & 2 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as path from 'path'
import fetch from 'node-fetch'

import * as gcc from '../src/gcc'
import * as main from '../src/main'
import * as setup from '../src/setup'

process.env['RUNNER_TOOL_CACHE'] = path.join(__dirname, 'CACHE')
process.env['RUNNER_TEMP'] = path.join(__dirname, 'TEMP')
Expand Down Expand Up @@ -59,7 +59,7 @@ function hasGcc(dir: string): boolean {
}

async function tmpInstall(release: string, platform?: string): Promise<void> {
const gccDir = await main.install(release, platform)
const gccDir = await setup.install(release, platform)
expect(hasGcc(gccDir)).toEqual(true)
}

Expand Down
Loading