From d7186e9a1286558bc0c0b93f8dbd455a0d22d210 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 25 Nov 2021 20:06:13 -0500 Subject: [PATCH] use setup-python with cache for python dependencies --- .github/workflows/static.yml | 7 ++++++- requirements.txt | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 requirements.txt diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index a11bcc15..733842a8 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -16,6 +16,10 @@ jobs: - uses: actions/setup-node@v2.4.1 with: cache: 'npm' + - uses: actions/setup-python@v2 + with: + python-version: '3.9' + cache: 'pip' - name: Cache validator id: validator-cache @@ -25,8 +29,9 @@ jobs: key: ${{ runner.os }}-validator-${{ env.VALIDATOR_VERSION }} - run: sudo apt-get update - - run: sudo apt-get -y install libxml2-utils yajl-tools python3-lxml python3-cssselect moreutils brotli zopfli + - run: sudo apt-get -y install libxml2-utils yajl-tools moreutils brotli zopfli - run: npm install + - run: pip install -r requirements.txt - name: Download validatornu # There isn't a package with a `validatornu` command in Ubuntu, so download the validator diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..e87585d0 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +lxml +cssselect