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

ci: Add ubuntu-20.04 to matrix #336

Merged
merged 1 commit into from
Jun 4, 2020
Merged
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
68 changes: 4 additions & 64 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
strategy:
matrix:
os:
- 'ubuntu-20.04'
- 'ubuntu-18.04'
- 'ubuntu-16.04'
- 'macos-latest'
Expand Down Expand Up @@ -168,71 +169,10 @@ jobs:
user_email: 'github-actions[bot]@users.noreply.github.com'
# commit_message: ${{ github.event.head_commit.message }}

test-ubuntu-2004:
runs-on: 'ubuntu-18.04'
if: contains(github.event.head_commit.message, '[skip ci]') == false
container:
image: 'ubuntu:20.04'
steps:
- name: Install deps
run: |
apt update
apt install -y software-properties-common
add-apt-repository ppa:git-core/ppa
apt update
apt install -y \
git \
ssh

- uses: actions/checkout@v2

- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "${GITHUB_CONTEXT}"

- name: Read .nvmrc
run: echo "::set-output name=NVMRC::$(cat .nvmrc)"
id: nvm

- name: Setup Node
uses: actions/[email protected]
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- run: npm i -g npm

- name: Dump version
run: |
node -v
npm --version
git --version

- run: npm ci
- run: npm test

- name: Run ncc
run: npm run build

- name: Remove lint-staged husky
if: github.ref == 'refs/heads/master'
run: |
npm uninstall lint-staged husky
git checkout package-lock.json package.json

- name: Setup mdBook
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.3.7'

- name: Build site
if: github.ref == 'refs/heads/master'
working-directory: ./test_projects/mdbook
run: mdbook build

- name: Deploy
if: github.ref == 'refs/heads/master'
if: |
startsWith(matrix.os, 'ubuntu-20.04') &&
github.ref == 'refs/heads/master'
uses: ./
with:
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
Expand Down