Merge pull request #420 from metanorma/update_pres_xml #672
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: test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths-ignore: | |
- .github/workflows/release.yml | |
jobs: | |
prepare-ieee: | |
uses: ./.github/workflows/prepare.yml | |
secrets: | |
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }} | |
build: | |
runs-on: ${{ matrix.os }} | |
needs: [ prepare-ieee ] | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
fail-fast: false | |
matrix: | |
java: [ 1.8 ] | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
experimental: [ false ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }} | |
- uses: actions/[email protected] | |
with: | |
name: ieee-test-input | |
path: ieee | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.1 | |
rubygems: latest | |
# bundler: 2.5.10 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- if: matrix.os == 'windows-latest' | |
uses: nick-invision/retry@v1 | |
with: | |
polling_interval_seconds: 5 | |
timeout_minutes: 5 | |
max_attempts: 3 | |
command: choco install --no-progress make gnuwin32-coreutils.install curl yq wget | |
- if: matrix.os == 'macos-latest' | |
run: brew install maven yq | |
- if: matrix.os == 'ubuntu-latest' | |
run: sudo snap install yq | |
- if: matrix.os == 'ubuntu-latest' | |
run: gem install metanorma-cli | |
- if: matrix.os != 'ubuntu-latest' | |
run: gem install metanorma-cli | |
- if: matrix.os == 'ubuntu-latest' | |
run: | | |
mkdir ~/bundle_tmp | |
bundle config path ~/bundle_tmp | |
- run: bundle update | |
- run: make testMN2STS | |
- run: make testSTS2MN | |
- run: make testMN2IEEE | |
- run: make NISO-STS-Standard | |
- if: matrix.os == 'ubuntu-latest' | |
name: Notify mn-samples-bsi | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }} | |
repository: metanorma/mn-samples-bsi | |
event-type: metanorma/mnconvert | |
client-payload: '{ "ref": "${{ github.ref }}" }' | |
- run: make mn2stsDTD_NISO | |
- run: make mn2stsDTD_ISO | |
- run: make all | |
- run: make publish | |
- uses: actions/upload-artifact@master | |
with: | |
name: published-${{ matrix.os }} | |
path: published | |
deploy-gh-pages: | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/download-artifact@master | |
with: | |
name: published-ubuntu-latest | |
path: published | |
- uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ github.token }} | |
publish_dir: ./published | |
force_orphan: true | |
user_name: ${{ github.actor }} | |
user_email: ${{ format('{0}@users.noreply.github.com', github.actor) }} | |
commit_message: "${{ format('Deploy to GitHub Pages: {0}', github.sha) }}" |