nightly #292
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: nightly | |
on: | |
schedule: | |
# Pick a random time, something that others won't pick, to reduce GH's demand variance. | |
- cron: "49 10 * * *" | |
pull_request: | |
paths: | |
- ".github/workflows/nightly.yaml" | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
cargo-audit: | |
runs-on: ubuntu-latest | |
# We can't read PRQL repo security events on forks, which causes this to | |
# incorrectly fail ( https://github.com/PRQL/prql/actions/runs/5718693342/job/15495030808?pr=3195#step:3:28). So we disable. If we wanted to run checks on PRs, we | |
# could move this to `pull-request-target`. And note that it does suggest that it can run on forks at https://github.com/rustsec/audit-check#limitations | |
if: ${{ !github.event.pull_request.head.repo.fork }} | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
issues: write | |
checks: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: rustsec/audit-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# Maybe add to test-all? | |
cargo-bench: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: richb-hanover/cargo@v1.1.0 | |
with: | |
command: bench | |
args: --timings --all-targets | |
check-links-markdown: | |
# We run only on modified files and only on our resources in PRs; here we | |
# run on all links and all files. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: gaurav-nelson/github-action-markdown-link-check@v1 | |
with: | |
config-file: .config/.markdown-link-check-all.json | |
time-compilation: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
use_cache: [true, false] | |
steps: | |
- name: 📂 Checkout code | |
uses: actions/checkout@v3 | |
- uses: ./.github/actions/time-compilation | |
with: | |
use_cache: ${{ matrix.use_cache }} | |
update-rust-toolchain: | |
runs-on: ubuntu-latest | |
# Don't run on forks; will attempt to create a PR into the fork... | |
# if: ${{ !github.event.pull_request.head.repo.fork }} | |
# Disable until 1.72.0 is released, see https://github.com/rust-lang/rust/pull/112154 | |
if: false | |
# Note that this doesn't change the minimum supported version, only the | |
# default to run on. The minimum is defined by Cargo.toml's metadata.msrv. | |
steps: | |
- name: 📂 Checkout code | |
uses: actions/checkout@v3 | |
- uses: a-kenji/update-rust-toolchain@main | |
with: | |
# Discussion in #1561 | |
minor-version-delta: 1 | |
toolchain-path: "./rust-toolchain.toml" | |
pr-title: "build: Update rust toolchain version" | |
check-unused-dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📂 Checkout code | |
uses: actions/checkout@v3 | |
- run: rustup override set nightly-2023-04-22 | |
- uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-udeps | |
# Once with all targets, once without, to find anything that should be in | |
# `dev` but is more general. | |
- uses: richb-hanover/cargo@v1.1.0 | |
with: | |
command: udeps | |
args: --all-targets | |
- uses: richb-hanover/cargo@v1.1.0 | |
with: | |
command: udeps | |
# This is expensive and very rarely finds an issue so, in addition to running | |
# on any change to the file, we run it in nightly rather than test-all. | |
test-taskfile: | |
uses: ./.github/workflows/test-taskfile.yaml | |
# We now use the devcontainer. TODO: is it possible to have a similar test for | |
# that? Or that would require VSCode to install the dependencies? | |
# test-docker: | |
# # We only test the build in `test-all`; this also runs tests. | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: 📂 Checkout code | |
# uses: actions/checkout@v3 | |
# - uses: docker/setup-buildx-action@v2 | |
# - name: Build | |
# uses: docker/build-push-action@v4 | |
# with: | |
# tags: prql:latest | |
# # Use the GHA cache | |
# load: true | |
# cache-from: type=gha | |
# cache-to: type=gha,mode=max | |
# # https://aschmelyun.com/blog/using-docker-run-inside-of-github-actions/ | |
# - name: Test | |
# uses: addnab/docker-run-action@v3 | |
# with: | |
# image: prql:latest | |
# options: -v ${{ github.workspace }}/:/src | |
# run: task test-rust | |
code-ql: | |
# Currently almost the default code-ql config | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ["javascript", "python"] | |
# We could add java, but it require a custom build step and we have very little java... | |
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | |
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
# If you wish to specify custom queries, you can do so here or in a config file. | |
# By default, queries listed here will override any specified in a config file. | |
# Prefix the list here with "+" to use these queries and those in the config file. | |
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | |
# queries: security-extended,security-and-quality | |
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | |
# If this step fails, then you should remove it and run the build manually (see below) | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v2 | |
# ℹ️ Command-line programs to run using the OS shell. | |
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | |
# If the Autobuild fails above, remove it and uncomment the following three lines. | |
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | |
# - run: | | |
# echo "Run, Build Application using script" | |
# ./location_of_script_within_repo/buildscript.sh | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
nightly-release: | |
# Test release workflow | |
uses: ./.github/workflows/release.yaml | |
with: | |
dry-run: false |