Skip to content

Commit

Permalink
ci(workflows): upgrade action versions and ubuntu in workflows (#11376)
Browse files Browse the repository at this point in the history
  • Loading branch information
y3rsh committed Sep 14, 2022
1 parent d340402 commit b2ef09a
Show file tree
Hide file tree
Showing 19 changed files with 177 additions and 162 deletions.
12 changes: 10 additions & 2 deletions .github/actions/python/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ inputs:
python-version:
description: "What Python version to use to create the project's virtual environment"
required: false
default: "false"
runs:
using: 'composite'
steps:
Expand All @@ -16,9 +17,16 @@ runs:
sudo apt-get update
sudo apt-get install -y --no-install-recommends libsystemd-dev
fi
- name: Set the OT_PYTHON env variable
shell: bash
run: echo "OT_PYTHON=$(which python)" >> $GITHUB_ENV
- name: If provided set the OT_VIRTUALENV_VERSION env variable
shell : bash
if: ${{ inputs.python-version != 'false' }}
run: echo "OT_VIRTUALENV_VERSION=${{ inputs.python-version }}" >> $GITHUB_ENV
- shell: bash
run: |
npm install --global [email protected]
pip install pipenv==2021.5.29
$OT_PYTHON -m pip install pipenv==2021.5.29
- shell: bash
run: 'make -C ${{ inputs.project }} setup OT_VIRTUALENV_VERSION=${{ inputs.python-version }}'
run: 'make -C ${{ inputs.project }} setup'
30 changes: 15 additions & 15 deletions .github/workflows/api-test-lint-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ jobs:
lint:
name: 'opentrons package linting'
timeout-minutes: 10
runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-22.04'
steps:
- uses: 'actions/checkout@v2'
- uses: 'actions/setup-node@v1'
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
- uses: 'actions/setup-python@v2'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'

Expand All @@ -66,7 +66,7 @@ jobs:
needs: [lint]
strategy:
matrix:
os: ['windows-2019', 'ubuntu-18.04', 'macos-latest']
os: ['windows-2019', 'ubuntu-22.04', 'macos-latest']
# TODO(mc, 2022-02-24): expand this matrix to 3.8 and 3.9,
# preferably in a nightly cronjob on edge or something
python: ['3.7', '3.10']
Expand All @@ -82,15 +82,15 @@ jobs:
with-ot-hardware: 'true'
runs-on: '${{ matrix.os }}'
steps:
- uses: 'actions/checkout@v2'
- uses: 'actions/setup-node@v1'
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
- uses: 'actions/setup-python@v2'
- uses: 'actions/setup-python@v4'
with:
python-version: ${{ matrix.python }}
- name: 'set complex environment variables'
uses: actions/github-script@v3.1
uses: actions/github-script@v6.1.1
with:
script: |
const { buildComplexEnvVars, } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
Expand All @@ -113,26 +113,26 @@ jobs:
- name: Ensure assets build
run: make -C api sdist wheel
- name: Upload coverage report
uses: 'codecov/codecov-action@v2'
uses: 'codecov/codecov-action@v3'
with:
files: ./api/coverage.xml
flags: api

deploy:
name: 'deploy opentrons package'
needs: [test]
runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-22.04'
if: github.event_name == 'push'
steps:
- uses: 'actions/checkout@v2'
- uses: 'actions/setup-node@v1'
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
- uses: 'actions/setup-python@v2'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
- name: 'set complex environment variables'
uses: actions/github-script@v3.1
uses: actions/github-script@v6.1.1
with:
script: |
const { buildComplexEnvVars, } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/app-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,25 @@ jobs:
js-unit-test:
# unit tests for js frontend projects (e.g. not app-shell or discovery-client) do not need
# to run cross-platform
runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-22.04'
name: 'opentrons app frontend unit tests'
timeout-minutes: 30
steps:
- uses: 'actions/checkout@v2'
- uses: 'actions/setup-node@v1'
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
- name: 'install udev'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/github-script@v3.1
uses: actions/github-script@v6.1.1
with:
script: |
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
buildComplexEnvVars(core, context)
- name: 'cache yarn cache'
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.npm-cache/_prebuild
Expand All @@ -79,7 +79,7 @@ jobs:
run: |
yarn jest --coverage=true --ci=true --collectCoverageFrom="app/src/**/*.(js|ts|tsx)" app/src components/src shared-data/js
- name: 'Upload coverage report'
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: ./coverage/lcov.info
flags: app
Expand All @@ -89,30 +89,30 @@ jobs:
# to run cross-platform just like builds, might as well do them in the same job
strategy:
matrix:
os: ['windows-2019', 'ubuntu-18.04', 'macos-latest']
os: ['windows-2019', 'ubuntu-22.04', 'macos-latest']
name: 'opentrons app backend unit tests and build'
needs: ['js-unit-test']
runs-on: ${{ matrix.os }}
steps:
- uses: 'actions/checkout@v2'
- uses: 'actions/setup-node@v1'
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: 'install libudev'
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/github-script@v3.1
uses: actions/github-script@v6.1.1
with:
script: |
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
buildComplexEnvVars(core, context)
- name: 'cache yarn cache'
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.npm-cache/_prebuild
Expand All @@ -127,7 +127,7 @@ jobs:
run: |
yarn jest --coverage=true --ci=true --collectCoverageFrom="(app-shell|discovery-client)/src/**/*.(js|ts|tsx)" app-shell/src discovery-client/src
- name: 'Upload coverage report'
uses: 'codecov/codecov-action@v2'
uses: 'codecov/codecov-action@v3'
with:
files: ./coverage/lcov.info
flags: app
Expand All @@ -151,19 +151,19 @@ jobs:
- if: github.event_name != 'pull_request'
name: 'upload github artifact'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: 'opentrons-${{ matrix.os }}'
path: app-shell/dist/publish

deploy-app:
name: 'Deploy built app artifacts to S3'
runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-22.04'
needs: ['js-unit-test', 'build-app-test-backend']
if: github.event_name != 'pull_request'
steps:
- name: 'download run app builds'
uses: 'actions/download-artifact@v2'
uses: 'actions/download-artifact@v3'
with:
path: .
- name: 'deploy builds to s3'
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/components-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ jobs:
js-unit-test:
name: 'components unit tests'
timeout-minutes: 30
runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-22.04'
steps:
- uses: 'actions/checkout@v2'
- uses: 'actions/setup-node@v1'
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.yarn-cache
Expand All @@ -59,25 +59,25 @@ jobs:
run: |
yarn jest --coverage=true --ci=true --collectCoverageFrom="components/src/**/*.(js|ts|tsx)" components/src
- name: 'Upload coverage report'
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: ./coverage/lcov.info
flags: components

build-components:
name: 'build components artifact'
runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-22.04'
if: github.event_name != 'pull_request'
needs: ['js-unit-test']
steps:
- uses: 'actions/checkout@v2'
- uses: 'actions/setup-node@v1'
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.yarn-cache
Expand All @@ -93,29 +93,29 @@ jobs:
- name: 'build components'
run: make -C components
- name: 'upload github artifact'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: 'components-artifact'
path: storybook-static
deploy-components:
name: 'deploy components artifact to S3'
runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-22.04'
needs: ['js-unit-test', 'build-components']
if: github.event_name != 'pull_request'
steps:
- uses: 'actions/checkout@v2'
- uses: 'actions/setup-node@v1'
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/github-script@v3.1
uses: actions/github-script@v6.1.1
with:
script: |
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
buildComplexEnvVars(core, context)
- name: 'download components build'
uses: 'actions/download-artifact@v2'
uses: 'actions/download-artifact@v3'
with:
name: components-artifact
path: ./dist
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ defaults:
jobs:
build:
name: opentrons documentation build
runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-22.04'
steps:
- uses: 'actions/checkout@v2'
- uses: 'actions/setup-node@v1'
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
- uses: 'actions/setup-python@v2'
- uses: 'actions/setup-python@v3'
with:
python-version: '3.7'
- uses: './.github/actions/python/setup'
with:
project: 'api'
- name: 'set complex environment variables'
uses: actions/github-script@v3.1
uses: actions/github-script@v6.1.1
with:
script: |
const { buildComplexEnvVars, } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/g-code-confirm-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:
'fast'
]
name: 'Confirm G-Code (${{ matrix.command }})'
runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-22.04'
steps:
- uses: 'actions/checkout@v2'
- uses: 'actions/setup-node@v1'
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '12'
- uses: 'actions/setup-python@v2'
- uses: 'actions/setup-python@v3'
with:
python-version: '3.7'
- uses: './.github/actions/python/setup'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/g-code-testing-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ defaults:
jobs:
lint-test:
name: 'g-code-testing package linting and tests'
runs-on: 'ubuntu-18.04'
runs-on: 'ubuntu-22.04'
steps:
- uses: 'actions/checkout@v2'
- uses: 'actions/setup-node@v1'
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '12'
- uses: 'actions/setup-python@v2'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'

Expand All @@ -52,7 +52,7 @@ jobs:
- name: Test
run: make -C g-code-testing test
- name: 'Upload coverage report'
uses: 'codecov/codecov-action@v2'
uses: 'codecov/codecov-action@v3'
with:
files: ./g-code-testing/coverage.xml
flags: g-code-testing
Loading

0 comments on commit b2ef09a

Please sign in to comment.